Skip to content

Commit

Permalink
add db service
Browse files Browse the repository at this point in the history
  • Loading branch information
ytliuSVN committed Oct 29, 2024
1 parent f201a1b commit 0b0ff69
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,23 @@ services:
volumes:
- ./app:/app
command: >
sh -c "python manage.py runserver 0.0.0.0:8000"
sh -c "python manage.py runserver 0.0.0.0:8000"
environment:
- DB_HOST=db
- DB_NAME=devdb
- DB_USER=devuser
- DB_PASS=Password1
depends_on:
- db

db:
image: postgres:13-alpine
volumes:
- dev-db-data:/var/lib/postgresql/data
environment:
- POSTGRES_DB=devdb
- POSTGRES_USER=devuser
- POSTGRES_PASSWORD=Password1

volumes:
dev-db-data:

0 comments on commit 0b0ff69

Please sign in to comment.