coollabsio / coolify

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

[Bug]: Error creating a project with GlitchTip template #2743

Open SebasGDEV opened 2 months ago

SebasGDEV commented 2 months ago

Description

I'm trying to use GlitchTips with the template integrated in coolify v4.0.0-beta.306 on Ubuntu 24.04 LTS, Kernel 6.8.0-36 but shows an duplicated key error.

Duplcated key error on glitchtip template creation

Minimal Reproduction (if possible, example repository)

Go to Projects -> +Add -> Add New Resource -> Services Section -> Select GlitchTip Template and then the error shows

Exception or Error

Logs from coolify-db postgres

2024-07-03 21:26:59.317 UTC [129196] ERROR: duplicate key value violates unique constraint "service_applications_fqdnunique" 2024-07-03 21:26:59.317 UTC [129196] DETAIL: Key (fqdn)=(https://glitchtip-os0o00g.{my domain}_.com:8080) already exists. 2024-07-03 21:26:59.317 UTC [129196] STATEMENT: update "service_applications" set "fqdn" = $1, "updated_at" = $2 where "id" = $3 2024-07-03 21:30:43.475 UTC [26] LOG: checkpoint starting: time 2024-07-03 21:30:53.219 UTC [26] LOG: checkpoint complete: wrote 98 buffers (0.6%); 0 WAL file(s) added, 0 removed, 0 recycled; write=9.733 s, sync=0.0 2024-07-03 21:32:53.610 UTC [129809] ERROR: duplicate key value violates unique constraint "service_applications_fqdnunique" 2024-07-03 21:32:53.610 UTC [129809] DETAIL: Key (fqdn)=(https://glitchtip-os0o00g.{my domain}_.com:8080) already exists. 2024-07-03 21:32:53.610 UTC [129809] STATEMENT: update "service_applications" set "fqdn" = $1, "updated_at" = $2 where "id" = $3

Version

v4.0.0-beta.306

dev-mantas commented 1 month ago

Can confirm this is still happening v4.0.0-beta.307. Also after this error happens it is still added to the project area, and when trying to deploy same error pops up.

Ubuntu 24.04

guillaumeklaus commented 1 month ago

Encountered the same issue, after some research I found a workaround.

In the docker-compose file, it appears that web and worker services share the same domain, I put a different one in worker entry :

- 'GLITCHTIP_DOMAIN=${SERVICE_FQDN_GLITCHTIP_WORKER}'

after defining it in env variables section, everything seems to run normally

Use a different port for web and worker should also do the trick but I haven't tested it.

tconroy commented 1 week ago

@guillaumeklaus : how were you able to save the docker-compose? When I try to change it I get error The docker compose field is required. and it seems the change doesn't stick