Skip to content

Fixes #4: Resolved 502 Bad Gateway error by updating docker-compose.yml #16

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

GaneshN523
Copy link

Summary:

This pull request fixes Issue #4, where the Nginx reverse proxy was returning a 502 Bad Gateway error due to FastAPI services not being ready before startup.

Changes Made:

  • Health Checks: Added pg_isready health checks for movie_db and cast_db to ensure they are available before dependent services start.
  • Updated depends_on Behavior: Now waits for database readiness instead of just container startup.
  • Restart Policies: Set restart: always for all services to improve reliability.
  • Fixed Volume Issue: Corrected postgres_data_cast volume declaration.
  • Ensured Proper Networking: Verified service-to-service communication within the Docker network.

How to Test:

  1. Rebuild and start containers:
    docker-compose up --build -d

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