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

[Bug]: Database Error When Setting FQDN Env Variable in docker-compose #4805

Open
mxhffmn opened this issue Jan 12, 2025 · 0 comments
Open
Labels
🐛 Bug Reported issues that need to be reproduced by the team. 🔍 Triage Issues that need assessment and prioritization.

Comments

@mxhffmn
Copy link

mxhffmn commented Jan 12, 2025

Error Message and Logs

I encountered a database error when trying to deploy an application with multiple services via docker-compose. Let me first explain, how I got to this issue: I want to deploy an application with multiple different services. There is a container hosting a web frontend, a container hosting a backend service, multiple different database, and so on. Almost all of these services have some kind of UI to manage them. For example, I am using the database Influx for time series data and want to be able to access the provided UI from a public domain. So I created a new docker-compose resource and pasted the docker-compose file with the services. I noticed that I was only able to set a custom domain for some services. The problem seems to be that Coolify detects some services (including Influx) as databases and some as applications. I could only define a custom domain for the applications. This does not make sense to me.

While trying to work around this problem, I set the FQDN env variable in the docker-compose to get any domain. This produced the following error message:

SQLSTATE[42703] Undefined column 7 ERROR  column fqdn of relation service_databases does not exist
LINE 1 update service_databases set fqdn = $1, updated_at = $...
                                       ^ (Connection pgsql, SQL update service_databases set fqdn = httpsinfl-kc40wc4c0wgswcgo4wc04swc.aimpera.de, updated_at = 2025-01-12 095134 where id = 13)

Steps to Reproduce

  1. Create a new docker-compose resource
  2. Paste the following example:
services:
  edgedb:
    image: 'edgedb/edgedb:5'
    restart: on-failure
    environment:
      - SERVICE_FQDN_EDGEDB
      - EDGEDB_SERVER_ADMIN_UI=enabled
      - EDGEDB_SERVER_INSTANCE_NAME=main-instance
      - EDGEDB_SERVER_USER=testuser
      - EDGEDB_SERVER_PASSWORD=testuser-password
      - EDGEDB_SERVER_TLS_CERT_MODE=generate_self_signed
      - EDGEDB_SERVER_HTTP_ENDPOINT_SECURITY=optional
  influxdb:
    image: 'influxdb:2'
    restart: on-failure
    environment:
      - SERVICE_FQDN_INFLUXDB
      - DOCKER_INFLUXDB_INIT_MODE=setup
      - DOCKER_INFLUXDB_INIT_USERNAME=testuser
      - DOCKER_INFLUXDB_INIT_PASSWORD=testuser-password
      - DOCKER_INFLUXDB_INIT_ORG=testorg
      - DOCKER_INFLUXDB_INIT_BUCKET=main-bucket
  1. The database error is thrown but the resource is still created.
  2. Notice how the EdgeDB service (which is also a database) has a generated domain but Influx has not. This counterintuitive in my opinion.

Example Repository URL

No response

Coolify Version

v4.0.0-beta.380

Are you using Coolify Cloud?

No (self-hosted)

Operating System and Version (self-hosted)

Ubuntu 22.04

Additional Information

Apart from fixing this bug, it might be good to know if there is any way to make a service accessible via domain, even if it is recognized internally as a database.

@mxhffmn mxhffmn added 🐛 Bug Reported issues that need to be reproduced by the team. 🔍 Triage Issues that need assessment and prioritization. labels Jan 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Reported issues that need to be reproduced by the team. 🔍 Triage Issues that need assessment and prioritization.
Projects
None yet
Development

No branches or pull requests

1 participant