Skip to content
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

fix: Fix Docker compose startup issues (letta-ai#2056) #2057

Merged
merged 2 commits into from
Nov 18, 2024

Conversation

sethanderson1
Copy link
Contributor

Please describe the purpose of this pull request.
This PR fixes two Docker compose startup issues:

  1. Removes duplicate nginx port listener configuration that causes nginx container to fail
  2. Adds proper database healthcheck to ensure Letta server only starts after database is ready to accept connections

How to test

  1. Pull the changes and run:
docker compose up

Expected outcomes:

  • All three containers should start successfully, as shown:
[+] Running 4/3
 ✔ Network letta_default           Created                                                                                                              0.0s 
 ✔ Container letta-letta_db-1      Created                                                                                                              0.1s 
 ✔ Container letta-letta_nginx-1   Created                                                                                                              0.1s 
 ✔ Container letta-letta_server-1  Created
  • No duplicate port listener error from nginx
  • No database connection errors from Letta server
  • System should be fully operational after startup completes

Have you tested this PR?
Yes, tested the latest commit. The system starts up cleanly as shown in the test output above, with all services starting and remaining running, with no connection errors.

Related issues or PRs
Fixes #2056

Is your PR over 500 lines of code?
No, this PR makes minimal targeted changes to nginx.conf and compose.yaml.

Additional context
These changes ensure reliable container startup sequence by:

  • Cleaning up nginx configuration
  • Using Docker's healthcheck feature to coordinate service startup
  • Preventing race conditions in database connectivity

Copy link
Collaborator

@sarahwooders sarahwooders left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution, looks great!

@sarahwooders sarahwooders merged commit 9598d57 into letta-ai:main Nov 18, 2024
8 of 20 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.

Docker Compose startup issues: nginx configuration and database initialization
2 participants