Skip to content

Commit

Permalink
Update compose.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
shakhzod2000 authored Aug 17, 2024
1 parent efabc4a commit 902fa3e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions compose.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
services:
db:
image: mysql:8.0
restart: always
environment:
MYSQL_DATABASE: ${DATABASE_NAME}
MYSQL_ROOT_PASSWORD: ${DATABASE_ROOT_PASSWORD}
secrets:
- db_root_password
ports:
- "3306:3306"
volumes:
- db_data:/var/lib/mysql

secrets:
db_root_password:
file: ./secrets/db_root_password.txt

web:
build: .
command: ./scripts/wait-for-it.sh -- python manage.py runserver 0.0.0.0:8000
Expand All @@ -24,6 +31,10 @@ services:
DATABASE_PASSWORD: ${DATABASE_PASSWORD}
DATABASE_HOST: db
DATABASE_PORT: ${DATABASE_PORT}
develop:
watch:
- action: rebuild
path: .

volumes:
db_data:

0 comments on commit 902fa3e

Please sign in to comment.