Skip to content

Commit

Permalink
fix: add volume mapping for client service
Browse files Browse the repository at this point in the history
the client container needs DJANGO_STORAGE_DIR to be
`/home/calitp/app/data` because the nginx.conf location blocks use that
base path to serve media files.

the volume mapping is needed so that the container has access to the
django.db file and the uploads/ directory from the host side of the
mapping.
  • Loading branch information
angela-tran committed Jan 9, 2025
1 parent e119bea commit 0f450bf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ services:
env_file: .env
ports:
- "${DJANGO_LOCAL_PORT:-8000}:8000"
volumes:
- ./:/home/calitp/app/data # matches the path in nginx.conf for static / media files. set your DJANGO_STORAGE_DIR to `/home/calitp/app/data` so the container can access `django.db` and `uploads/`.

dev:
build:
Expand Down

0 comments on commit 0f450bf

Please sign in to comment.