From 833ff378eada0ccca1b5af5d2757958c2b131d6b Mon Sep 17 00:00:00 2001 From: codex_a Date: Sat, 28 Feb 2026 21:47:02 +0000 Subject: [PATCH] fix: use entrypoint script for prod container startup YAML folded block scalar (>) was preserving newlines for more-indented continuation lines, so gunicorn received no arguments and defaulted to binding on 127.0.0.1:8000. Replace with an explicit entrypoint script so all args are passed correctly. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- deploy/entrypoint.prod.sh | 14 ++++++++++++++ docker-compose.prod.yml | 12 +----------- 2 files changed, 15 insertions(+), 11 deletions(-) create mode 100755 deploy/entrypoint.prod.sh diff --git a/deploy/entrypoint.prod.sh b/deploy/entrypoint.prod.sh new file mode 100755 index 0000000..f2d26a7 --- /dev/null +++ b/deploy/entrypoint.prod.sh @@ -0,0 +1,14 @@ +#!/bin/sh +set -e + +python manage.py tailwind install --no-input +python manage.py tailwind build +python manage.py migrate --noinput +python manage.py collectstatic --noinput + +exec gunicorn config.wsgi:application \ + --workers 3 \ + --bind 0.0.0.0:8000 \ + --access-logfile - \ + --error-logfile - \ + --capture-output diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index a897636..a4a309a 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -2,17 +2,7 @@ services: web: build: app working_dir: /app - command: > - sh -c "python manage.py tailwind install --no-input && - python manage.py tailwind build && - python manage.py migrate --noinput && - python manage.py collectstatic --noinput && - gunicorn config.wsgi:application - --workers 3 - --bind 0.0.0.0:8000 - --access-logfile - - --error-logfile - - --capture-output" + command: /app/deploy/entrypoint.prod.sh env_file: .env environment: DJANGO_SETTINGS_MODULE: config.settings.production