diff --git a/Dockerfile b/Dockerfile index e5e94f3..b6ea29e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -79,7 +79,7 @@ WORKDIR /app/krill EXPOSE 8000 # Production command -CMD ["sh", "-c", "uv run python manage.py migrate && uv run gunicorn --bind 0.0.0.0:8000 --workers 3 --timeout 120 krill.wsgi:application"] +CMD ["sh", "-c", "uv run python manage.py migrate && uv run gunicorn --bind 0.0.0.0:8000 --workers 3 --timeout 120 --no-control-socket krill.wsgi:application"] # Testing stage FROM base AS testing diff --git a/app.yaml b/app.yaml index 2c3912f..163746c 100644 --- a/app.yaml +++ b/app.yaml @@ -5,7 +5,7 @@ services: github: repo: your-username/krill branch: main - run_command: gunicorn krill.wsgi:application --bind 0.0.0.0:8000 + run_command: gunicorn krill.wsgi:application --bind 0.0.0.0:8000 --no-control-socket environment_slug: python instance_count: 1 instance_size_slug: basic-xxs diff --git a/docs/deployment/README.md b/docs/deployment/README.md index a7caed7..cf0af19 100644 --- a/docs/deployment/README.md +++ b/docs/deployment/README.md @@ -20,7 +20,7 @@ The multi-stage [`Dockerfile`](../../Dockerfile) installs dependencies with `uv` |--------|---------|---------| | `development` | Local container with dev dependencies | `runserver 0.0.0.0:8000` | | `testing` | Isolated test run | `manage.py test --verbosity=2` | -| `production` | Non-root user, static files collected | `manage.py migrate` then `gunicorn krill.wsgi:application` (3 workers) | +| `production` | Non-root user, static files collected | `manage.py migrate` then `gunicorn krill.wsgi:application` (3 workers, control socket off) | The Django project lives in the `krill/` subdirectory, so the production stage sets `WORKDIR /app/krill`. That is what makes `krill.wsgi:application` resolve to