Created
January 22, 2025 11:47
-
-
Save tarasowski/ddfe5941052d5f3fb086c0a9d77a3412 to your computer and use it in GitHub Desktop.
docker compose notes/api
This file contains hidden or 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
services: | |
db: | |
image: postgres:12 | |
container_name: notes-db-dev | |
volumes: | |
- db-data:/var/lib/postgresql/data | |
environment: | |
POSTGRES_DB: notesdb | |
POSTGRES_PASSWORD: secret | |
api: | |
build: | |
context: ./api | |
dockerfile: Dockerfile.dev | |
image: notes-api:dev | |
container_name: notes-api-dev | |
environment: | |
DB_HOST: db ## same as the database service name | |
DB_DATABASE: notesdb | |
DB_PASSWORD: secret | |
volumes: | |
- /home/node/app/node_modules | |
- ./api:/home/node/app | |
ports: | |
- 3000:3000 | |
volumes: | |
db-data: | |
name: notes-db-dev-data |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment