coollabsio / coolify

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

[Bug]: Docker Compose (One Click Service) does not update labels #4197

Open ingokpp opened 1 week ago

ingokpp commented 1 week ago

Error Message and Logs

I have created a simple wordpress Resource using the "Wordpress + MariaDB" instance. For the QFDN's i entered https://domain.com and https://www.domain.com. To make my http redirect work, i've tried to add labels to the compose file, however it seems like its impossible to change / overwrite default labels.

These (From deployable compose file):

  - 'caddy_0.encode=zstd gzip'
  - 'caddy_0.handle_path.0_reverse_proxy={{upstreams}}'
  - 'caddy_0.handle_path=/*'
  - caddy_0.header=-Server
  - 'caddy_0.try_files={path} /index.html /index.php'
  - 'caddy_0=https://domain.com'
  - 'caddy_1.encode=zstd gzip'
  - 'caddy_1.handle_path.1_reverse_proxy={{upstreams}}'
  - 'caddy_1.handle_path=/*'
  - caddy_1.header=-Server
  - 'caddy_1.try_files={path} /index.html /index.php'
  - 'caddy_1=https://www.domain.com'
  - caddy_ingress_network=blablabla

need to be changed to:

  - 'caddy_0.encode=zstd gzip'
  - 'caddy_0.handle_path.0_reverse_proxy={{upstreams}}'
  - 'caddy_0.handle_path=/*'
  - caddy_0.header=-Server
  - 'caddy_0.try_files={path} /index.html /index.php'
  - 'caddy_0=https://domain.com'
  - 'caddy_1.redir=https://domain.com'
  - 'caddy_1=https://www.domain.com'
  - caddy_ingress_network=blablabla

This would be the correct redirect and works when setting up a service without compose.

When i try to add all labels and look at the deployable compose file, it just adds them on bottom without overwriting the default ones.

Please let me know if there is a better way to redirect www https

Right now I have 2 DNS A Records:

domain.com -> serverIp *.domain.com -> serverIp

Steps to Reproduce

See on top.

Example Repository URL

No response

Coolify Version

v4.0.0-beta.363

Are you using Coolify Cloud?

No (self-hosted)

Operating System and Version (self-hosted)

No response

Additional Information

No response