coolify: [Bug]: Incorrect Environment Variables in Convex Deployment Template
Error Message and Logs
Description:
The current Convex deployment template in Coolify sets incorrect environment variables for CONVEX_CLOUD_ORIGIN and CONVEX_SITE_ORIGIN in the backend service definition. These variables should point to the backend service’s Fully Qualified Domain Name (FQDN), but they are currently pointing to the dashboard’s FQDN (SERVICE_FQDN_CONVEX_6791). Additionally, the CONVEX_SITE_ORIGIN has an optional /http suffix in the original template.
This causes issues because the backend relies on these origins for proper operation, and the dashboard needs to communicate with the backend using its correct address.
Original Incorrect Configuration:
In the backend service definition:
environment:
# ... other variables
- 'CONVEX_CLOUD_ORIGIN=${SERVICE_FQDN_CONVEX_6791}'
- 'CONVEX_SITE_ORIGIN=${SERVICE_FQDN_CONVEX_6791}/http'
# ... other variables
Proposed Fix:
The environment variables should be updated to use the backend’s FQDN variable (SERVICE_FQDN_BACKEND_3210) and remove the /http suffix from CONVEX_SITE_ORIGIN:
environment:
# ... other variables
- 'CONVEX_CLOUD_ORIGIN=${SERVICE_FQDN_BACKEND_3210}'
- 'CONVEX_SITE_ORIGIN=${SERVICE_FQDN_BACKEND_3210}'
# ... other variables
Impact:
Without this fix, self-hosted Convex deployments using this template may not function correctly, as internal services might try to communicate using the wrong origins or malformed URLs. In particular, users will results in a 404 missing page error if trying to upload files via dashboard or api.
Thank you for maintaining Coolify!
Steps to Reproduce
- Deploy template as-is
- Visit the Dashboard --> Files
- Try uploading a file
- 404 failure
Example Repository URL
No response
Coolify Version
v4.0.0-beta.395
Are you using Coolify Cloud?
No (self-hosted)
Operating System and Version (self-hosted)
Ubuntu 22.04
Additional Information
No response
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 4
- Comments: 16 (6 by maintainers)
@saitobp If you are on convex discord I have shared my files there, they are searchable.
Can you share what non-coolify dockerfile are you using and how to configure it on coolify? I’m trying to use convex auth but without any success, I guess it’s related to this issue, but if there’s a alternative while the PR is not merged I would appreciate
Edit: I’ve tried the docker-compose from the self host docs on the convex github but I did not manage to get it working