Skip to content

fix(deploy): harden production web startup - #68

Merged
Cybernetic-Ransomware merged 1 commit into
mainfrom
fix/production-web-startup
Sep 27, 2026
Merged

Cybernetic-Ransomware merged 1 commit into
mainfrom
fix/production-web-startup

Conversation

@Cybernetic-Ransomware

Copy link
Copy Markdown
Owner

Summary

  • Remove the dangling //# sourceMappingURL=chart.umd.min.js.map reference from the vendored Chart.js build so collectstatic (WhiteNoise CompressedManifestStaticFilesStorage) no longer fails post-processing on a missing .map file.
  • Make the production web container startup fail-fast: set -e before migrate/collectstatic, and exec gunicorn ... so Gunicorn replaces the shell instead of running under a shell that swallowed an earlier failure.
  • Disable Gunicorn's unused control socket (--no-control-socket) to stop the Permission denied: '/home/appuser' error, without creating a home directory or changing the image's user.

Test plan

  • docker compose -f docker/docker-compose-traefik.yml -f docker/docker-compose.cd.yml config renders cleanly with fictitious values (same set as the "Validate production Compose stack" CI job)
  • Rendered web.command confirmed to contain set -e / migrate / collectstatic / exec gunicorn ... --no-control-socket
  • uv run python manage.py collectstatic --noinput exits 0, no chart.umd.min.js.map reference, no post-processing failure
  • just lint (ruff check, ty check, codespell, bandit) passes
  • uv run pre-commit run (staged files) passes
  • just test — 558 passed

@Cybernetic-Ransomware
Cybernetic-Ransomware merged commit c8ed9dc into main Sep 27, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant