FATAL: password authentication failed for user "weblate" when starting Weblate dev stack
0 reputation · 10 Mar 2024, 02:06 UTC
The goal is to guarantee that the Weblate container starts only after the PostgreSQL service is ready to accept connections, thereby avoiding the authentication error that appears when the database is not yet available or credentials mismatch.
When using the official docker-compose-dev.yml, the solution must work across branches, avoid hard‑coded delays, remain compatible with the latest image tag, and not require manual intervention after a schema change. The uncertainty lies in whether adding depends_on: with condition: service_healthy to the db service is sufficient, or if a wait‑for script should still be injected into the Weblate container’s command, and what healthcheck should be defined for the PostgreSQL service to satisfy that condition.
Should the db service define a healthcheck that Weblate's depends_on can rely on? Is adding depends_on with condition: service_healthy sufficient, or is a wait‑for‑it.sh step still needed? Which approach aligns with the official recommendation for a repeatable development environment?