fix(compose): keep gunicorn flags intact in web command#231
Conversation
The web service used a YAML folded block scalar (command: >) for the sh -c script. Folded scalars collapse newlines to spaces, but the multi-line gunicorn invocation was being parsed such that the flags (--bind 0.0.0.0:8000, --workers, etc.) were dropped. gunicorn then fell back to its defaults: a single worker bound to 127.0.0.1:8000. Because the process bound to container-loopback rather than 0.0.0.0, Docker's published port (127.0.0.1:8000:8000) could not reach it, so the reverse proxy returned 502. Rewrite command as an explicit argv list with the full gunicorn invocation on a single physical line so every flag is preserved and the process binds to 0.0.0.0:8000 with the intended worker count.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThe ChangesWeb startup
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Ready to review this PR? Stage has broken it down into 1 individual chapter for you:
Chapters generated by Stage for commit 1ef4252 on Jul 10, 2026 9:32am UTC. |
The web service used a YAML folded block scalar (command: >) for the sh -c script. Folded scalars collapse newlines to spaces, but the multi-line gunicorn invocation was being parsed such that the flags (--bind 0.0.0.0:8000, --workers, etc.) were dropped. gunicorn then fell back to its defaults: a single worker bound to 127.0.0.1:8000.
Because the process bound to container-loopback rather than 0.0.0.0, Docker's published port (127.0.0.1:8000:8000) could not reach it, so the reverse proxy returned 502.
Rewrite command as an explicit argv list with the full gunicorn invocation on a single physical line so every flag is preserved and the process binds to 0.0.0.0:8000 with the intended worker count.
Summary by CodeRabbit