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 wrong database container name + code simplification #5175

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

Conversation

Gog0
Copy link

@Gog0 Gog0 commented Feb 17, 2025

Changes

  • Fixed wrong container name when proxying database service to publicly expose port
  • Code simplification

Issues

When trying to expose a database, Coolify starts an nginx proxy and pass requests to the database container. The problem is that this container name is based on database type instead of using the real service name. For example if the database is mysql, the proxy will try to pass requests to mysql-UUID, no matter what the real container name is.

For example if you install Firefly using the provided template, it creates a mysql service, so a mysql-UUID container. BUT it is actually using a mariadb docker image. So if you try to expose port in this, case, the proxy will try to pass requests to mariadb-UUID instead of mysql-UUID. The result is that the frontend says exposing port was a success, but in the backround the proxy fails to start and keeps restarting forever.

As the docker service used for the database can be named whatever, the proxy should use real name instead of assuming based on DB type.

@Gog0 Gog0 force-pushed the fix/wrong-container-name-for-database-proxy branch from 2c9d42f to 0d12b82 Compare February 18, 2025 23:06
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