Skip to content

Fix Odoo: resolve redirect loop and startup crash#64

Open
BookJJun-IJ wants to merge 2 commits into
Yundera:mainfrom
BookJJun-IJ:Odoo
Open

Fix Odoo: resolve redirect loop and startup crash#64
BookJJun-IJ wants to merge 2 commits into
Yundera:mainfrom
BookJJun-IJ:Odoo

Conversation

@BookJJun-IJ

@BookJJun-IJ BookJJun-IJ commented Jun 24, 2026

Copy link
Copy Markdown
Member

Summary

  • Fix infinite redirect loop caused by missing --proxy-mode flag when running behind Caddy reverse proxy
  • Fix wait-for-psql.py crash (NoSectionError: No section: 'options') caused by empty config volume mount overriding the built-in /etc/odoo/odoo.conf
  • Add container_name: odoo for stable Caddy DNS resolution per CONTRIBUTING.md
  • Add rationale.md documenting root container usage

Root Cause

  1. Redirect loop: Odoo generates HTTP redirect URLs without recognizing it's behind a TLS-terminating proxy. --proxy-mode makes Odoo respect X-Forwarded-* headers.
  2. Startup crash: The volume mount /DATA/AppData/$AppID/config/:/etc/odoo/ replaces the image's built-in odoo.conf with an empty directory. The entrypoint's wait-for-psql.py fails parsing the missing config file in a loop.

Test plan

  • Fresh install — Odoo starts without wait-for-psql.py errors
  • Web UI accessible via odoo-{APP_DOMAIN} without redirect loop
  • Database creation page loads with master password prompt
  • Uninstall/reinstall preserves existing odoo.conf modifications

- Add --proxy-mode to fix infinite redirect loop behind Caddy reverse proxy
- Add container_name for stable Caddy DNS resolution on pcs network
- Add pre-install-cmd to generate odoo.conf (fixes wait-for-psql.py crash
  when config volume mounts an empty directory over /etc/odoo/)
- Add rationale.md documenting root container usage
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