coollabsio / coolify

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

[Bug]: Supabase Service Broken - Workaround found - Cause Unknown #1966

Closed DamonGuzman closed 4 months ago

DamonGuzman commented 4 months ago

Description

I just recently installed coolify (today actually) after setting up a new box on Hetzner.

When trying to start the Supabase service using Coolify the docker-compose file that is created is incorrect. Every time I try to create the Supabase service, the docker compose file is having a section at the end added to the file, which breaks the setup.

The generated Docker Compose File:

`services: supabase-kong: image: 'kong:2.8.1' entrypoint: 'bash -c ''eval "echo \"$$(cat ~/temp.yml)\"" > ~/kong.yml && /docker-entrypoint.sh kong docker-start''' depends_on: supabase-analytics: condition: service_healthy environment:


The problem is caused by the last three lines: realtime-dev: supabase-realtime: image: 'supabase/realtime:v2.25.66'

When the last three lines are there, trying to deploy won't even begin downloading the Docker containers since it fails immediately. If I delete the 3 lines, the deployment continues but the realtime services won't start.

Minimal Reproduction (if possible, example repository)

Run the installation script on the website

Setup a subdomain ex: coolify.example.com

Try to spin up a Supabase service.

Exception or Error

validating /data/coolify/services/do84w84/docker-compose.yml: services.realtime-dev Additional property supabase-realtime is not allowed

Version

v4.0.0-beta.255

ejscheepers commented 4 months ago

A lot of people had this issue, so it's definitely not isolated. The other concerning thing is, each time you refresh the configuration page Coolify wipes any edits you made to Docker Compose file. This make is really difficult to trust the Supabase Service because it's very low fidelity.

w3cj commented 4 months ago

I made a PR to update the broken template, but you can see the change I made here: https://github.com/coollabsio/coolify/pull/1973/files

Along with removing the lines at the end of the file, you will need to rename the realtime-dev.supabase-realtime service to realtime-dev and add container_name: realtime-dev.supabase-realtime

andrasbacsai commented 4 months ago

I have also made a few modifications on the Supabase one-click service that will be released on the next version.

actraiser commented 4 months ago

fyi @andrasbacsai , in case this did not make it into your modifications yet, Supabase updated three tags in their minimal docker-compose.yml just the other day:

https://github.com/supabase/supabase/commit/304bec8839c0fa4047ec7e7d3d5630c5f9eca275

For what it's worth by the way, running Supabase on Coolify does actually work pretty good. Stuff that is a pain in the a** is the lack of documentation on Supabase's part around Self-Hosting. Maybe I do a write up of all the caveats i stumbled upon in the last weeks. Again, not Coolify's fault.

Greets -act