Skip to content

Commit 3c8f01c

Browse files
Do not mount source code in backend container; use env vars for database access
1 parent 5622b83 commit 3c8f01c

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

docker-compose.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ services:
3434
restart: unless-stopped
3535
environment:
3636
- PGHOST=postgres
37+
- PGUSER=$POSTGRES_USER
38+
- PGPASSWORD=$POSTGRES_PASSWORD
39+
- PGDATABASE=$POSTGRES_DB
40+
- DJANGO_SECRET_KEY=$DJANGO_SECRET_KEY
3741
- LANGPRO_CONTAINER=http://langpro:80
3842
- DJANGO_DEBUG=0
3943
depends_on:
@@ -42,7 +46,6 @@ services:
4246
healthcheck:
4347
test: "curl -f localhost:8000/admin/"
4448
volumes:
45-
- ./backend:/usr/src/app
4649
- ./logs/django:/usr/src/app/logs
4750
command: >
4851
gunicorn langpro_annotator.wsgi:application
@@ -62,6 +65,8 @@ services:
6265
- PGHOST=postgres
6366
- LANGPRO_CONTAINER=http://langpro:80
6467
- DJANGO_DEBUG=1
68+
volumes:
69+
- ./backend:/usr/src/app
6570
ports:
6671
- 127.0.0.1:8000:8000
6772
command: sh -c "python manage.py check && python manage.py migrate && python manage.py runserver 0.0.0.0:8000"

0 commit comments

Comments
 (0)