-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(docker): docker-compose for local development
a docker compose file containing the app and a postgres database have been added to provide a local dev stack to spin up. Therefore, the docker file multi stage build got updated. The prisma schema got updated as well to be able to run with certain types of Linux builds and also be compatible with Apple M1 systems
- Loading branch information
Showing
4 changed files
with
77 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
docker | ||
.dockerignore | ||
node_modules | ||
npm-debug.log | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
services: | ||
api: | ||
build: | ||
dockerfile: Dockerfile | ||
context: . | ||
target: development | ||
volumes: | ||
- .:/app | ||
env_file: | ||
- .env | ||
environment: | ||
BASE_URL: https://${HOSTNAME}:${PORT} | ||
DATABASE_URL: postgresql://${DB_USER}:${DB_PASSWORD}@postgres:${DB_PORT}/${DB_NAME}?schema=public | ||
command: npm run start:dev | ||
ports: | ||
- 3000:3000 | ||
depends_on: | ||
- postgres | ||
|
||
postgres: | ||
image: postgres:16 | ||
restart: always | ||
environment: | ||
POSTGRES_USER: ${DB_USER} | ||
POSTGRES_PASSWORD: ${DB_PASSWORD} | ||
POSTGRES_DB: ${DB_NAME} | ||
ports: | ||
- 5432:5432 | ||
volumes: | ||
- postgres:/var/lib/postgresql/data | ||
|
||
volumes: | ||
postgres: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters