coollabsio / coolify

An open-source & self-hostable Heroku / Netlify / Vercel alternative.
https://coolify.io
Apache License 2.0
34.43k stars 1.87k forks source link

[Bug]: Appwrite function domain is incorrect #3718

Open mikelgmh opened 1 month ago

mikelgmh commented 1 month ago

Error Message and Logs

The function domain generated using the GitHub integration is not correct. As you can see, it adds the function id before the Appwrite domain.

image

Steps to Reproduce

  1. Create a function in Appwrite using the GitHub integration
  2. Build the function

Example Repository URL

No response

Coolify Version

4.0.0-beta.355

Are you using Coolify Cloud?

No (self-hosted)

Operating System and Version (self-hosted)

Ubuntu 22.4

Additional Information

I found this thread and this on discord that discusses this same issue. The issue happened to users who had the installation using Coolify.

kuzerno1 commented 1 month ago

This because the SERVICEURL and SERVICEFQDN are mixed up like that was with COOLIFY_URL AND COOLIFY_FQDN. But the COOLIFY one got fixed, see #2443.

But when this gets fixed the url wont be reachable because you need to add the url to the domains list in the coolify appwrite service. There is a way to not have to do this but that involves to setup a wildcard ssl certificate for your domain.

mikelgmh commented 1 month ago

@kuzerno1 So I'm a little bit confused. I don't mind adding the urls to the domains list in the appwrite service, but which would be the solution to this problem? Do I need to update SERVICEURL or SERVICEFQDN in any specific way? Thank you in advance!

kuzerno1 commented 1 month ago

@mikelgmh you cant change these variables because they come from coolify. But you can change service_fqdn_appwrite to service_url_appwrite in the compose file.

This will work but soon as you add the function url I think it will break stuff in appwrite.

Because _APP_DOMAIN and a few other variables want only one domain if Im correctly. You will need to change the following env variables: _APP_DOMAIN, _APP_DOMAIN_FUNCTIONS and _APP_DOMAIN_TARGET to your main domain. And remove $SERVICE_FQDN_APPWRITE from the docker compose for these env variables.

There is an other issue about this problem where is more info: #2089

kuzerno1 commented 3 days ago

When pr #4226 is merged this issue will be partially fixed. You need only add the function domain manually to coolify or setup a wildcard ssl certificate for your domain for appwrite.