Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 7 additions & 14 deletions {{ cookiecutter.project_slug }}/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: '3.9'
version: "3.9"

services:
db:
Expand All @@ -14,7 +14,11 @@ services:
# Be cautious exposing DB ports in production environments
- "{{ cookiecutter.postgresql_port }}:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U {{ cookiecutter.postgresql_user }} -d {{ cookiecutter.postgresql_db }}"]
test:
[
"CMD-SHELL",
"pg_isready -U {{ cookiecutter.postgresql_user }} -d {{ cookiecutter.postgresql_db }}",
]
interval: 5s
timeout: 5s
retries: 5
Expand Down Expand Up @@ -42,13 +46,6 @@ services:
# command: python manage.py runserver_plus 0.0.0.0:8000
# Fallback to standard runserver
command: python manage.py runserver 0.0.0.0:8000
volumes:
# Mount current directory into container for code changes reflection
- .:/app
# Named volume for static files (can be shared with nginx later if needed)
- static_volume:/app/staticfiles
# Named volume for media files
- media_volume:/app/mediafiles
ports:
- "8000:8000"
Comment on lines 49 to 50

Copilot AI Oct 25, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing the .:/app volume mount from the web service eliminates hot-reloading during development. Developers will need to rebuild the container for every code change, significantly slowing down the development workflow. Consider keeping this volume mount for development or documenting this change in the PR description with rationale.

Copilot uses AI. Check for mistakes.
environment:
Expand Down Expand Up @@ -77,8 +74,6 @@ services:
context: .
dockerfile: Dockerfile
command: celery -A {{ cookiecutter.project_slug }}.celery worker --loglevel=info
volumes:
- .:/app
environment:

Copilot AI Oct 25, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing the .:/app volume mount from celery_worker eliminates hot-reloading for Celery task code changes. Developers will need to restart the container after every task modification, which hampers development efficiency. Consider retaining this mount for development environments.

Copilot uses AI. Check for mistakes.
- DJANGO_SETTINGS_MODULE={{ cookiecutter.project_slug }}.settings.local
- DJANGO_SECRET_KEY={{ cookiecutter.django_secret_key }}
Expand Down Expand Up @@ -108,8 +103,6 @@ services:
# command: celery -A {{ cookiecutter.project_slug }}.celery beat --loglevel=info --pidfile=/tmp/celerybeat.pid -s /tmp/celerybeat-schedule
# Command using DatabaseScheduler (recommended with django-celery-beat)
command: celery -A {{ cookiecutter.project_slug }}.celery beat --loglevel=info --scheduler django_celery_beat.schedulers:DatabaseScheduler
volumes:
- .:/app
environment:

Copilot AI Oct 25, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing the .:/app volume mount from celery_beat means Celery Beat configuration changes require container restarts. This impacts development workflow when modifying periodic tasks. Consider keeping this volume mount for development purposes.

Copilot uses AI. Check for mistakes.
- DJANGO_SETTINGS_MODULE={{ cookiecutter.project_slug }}.settings.local
- DJANGO_SECRET_KEY={{ cookiecutter.django_secret_key }}
Expand All @@ -135,4 +128,4 @@ volumes:
postgres_data:
redis_data:
static_volume:
media_volume:
media_volume: