coollabsio / coolify

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

[Bug]: Appwrite: The requested route was not found #4224

Closed crocofied closed 4 days ago

crocofied commented 2 weeks ago

Error Message and Logs

If you try to install appwrite and open it now in the browser you get this error on the site:

{"message":"The requested route was not found. Please refer to the API docs and try again.","code":404,"type":"general_route_not_found","version":"1.6.0"}

Steps to Reproduce

  1. Add new Service
  2. Select Appwrite
  3. Click Deploy
  4. Open the URL/Domain From Appwrite

Example Repository URL

No response

Coolify Version

v4.0.0-beta.364

Are you using Coolify Cloud?

No (self-hosted)

Operating System and Version (self-hosted)

Debian 12

Additional Information

No response

Mini-Sylar commented 2 weeks ago

It seems with appwrite 1.6, a new image "appwrite-console" has been added, separate from the "appwrite" image, it's missing in the coolify template file

Wodwes commented 2 weeks ago

can you share the complete template please

Mini-Sylar commented 2 weeks ago

@Wodwes Tried doing it manually, was getting a 500 error after starting the app, probably because of the strip prefix thing Seems there's an open PR tho, #4226,

bananacy commented 2 weeks ago

lol i just discovered both coolify and appwrite, thought i'd try them and boom doesn't work :-) {"message":"The requested route was not found. Please refer to the API docs and try again.","code":404,"type":"general_route_not_found","version":"1.6.0"}

ilbeybey commented 1 week ago

Yes, I have the same issue. I started to be use from 1.5.11 version until the 1.6 version is fixed. Coolify team please help us :)

Mini-Sylar commented 1 week ago

@ilbeybey here's what I've gathered so far, my issues have been resolved, you can follow this PR -> #4279

TLDR

Assuming you're able to start from scratch

Traefik

Caddy

appwrite-console:
  ## ... other stuff from the new template
     environment:
      - SERVICE_FQDN_APPWRITE=/console #this should already exist
    labels:
      - 'caddy_0.encode=zstd gzip'
      - 'caddy_0.handle=/console*'
      - 'caddy_0.handle.0_reverse_proxy={{upstreams}}'
      - caddy_0.header=-Server
      - 'caddy_0.try_files={path} /index.html /index.php'
      - 'caddy_0=YOUR DOMAIN ' # e.g https://appwrite.yourdomain.com or https://yourdomain.com, note the '
      - caddy_ingress_network=YOUR NETWORK   # You can find this in the deployable compose, the random string e.g ec4w4ow4coo....
appwrite-realtime:
   ##... other stuff from the new template
    - '_APP_USAGE_STATS=${_APP_USAGE_STATS:-enabled}'
      - '_APP_LOGGING_CONFIG=${_APP_LOGGING_CONFIG}'
    labels:
      - 'caddy_0.encode=zstd gzip'
      - 'caddy_0.handle=/v1/realtime*'
      - 'caddy_0.handle.0_reverse_proxy={{upstreams}}'
      - caddy_0.header=-Server
      - 'caddy_0.try_files={path} /index.html /index.php'
      - 'caddy_0=YOUR DOMAIN'
      - caddy_ingress_network=YOUR NETWORK 

You should be able to see your console now, if not you might get the 404 or redirected too many times

Data Backup

Now I know you may not be able to start from scratch so here are a few options to backup your data;

[!CAUTION] This might not be fool proof and you may lose your data, explore other options from appwrite/someone else first

Option 1

Option 2 (Did the migration but lost my data after migrating back but it's worth exploring)

Concerns

Disclaimer

I'm not affiliated with the coolify team, just thought i should gather all the info in one place;

Any updates or clarifications would be appreciated

ilbeybey commented 1 week ago

Thanks for your help @Mini-Sylar It worked!