coollabsio / coolify

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

[Bug]: Docker Swarm - Future warning (--detach) #4146

Open XenonR opened 2 weeks ago

XenonR commented 2 weeks ago

Error Message and Logs

Manager

Since --detach=false was not specified, tasks will be created in the background.
In a future release, --detach=false will become the default.
failed to update service coolify-proxy_traefik: Error response from daemon: rpc error: code = Unknown desc = update out of sequence

Worker

Since --detach=false was not specified, tasks will be created in the background.
In a future release, --detach=false will become the default.
this node is not a swarm manager. Use "docker swarm init" or "docker swarm join" to connect this node to swarm and try again

Steps to Reproduce

  1. Encountered with Docker version 27.3.1, build ce12230
  2. Docker Swarm was already setup.
  3. Add a Swam Manager or Swarm Worker in Coolify.
  4. Validate Server & Install.

Example Repository URL

No response

Coolify Version

v4.0.0-beta.360

Are you using Coolify Cloud?

No (self-hosted)

Operating System and Version (self-hosted)

Debian GNU/Linux 12 (bookworm)

Additional Information

The same error occurs when trying to deploy something.

XenonR commented 2 weeks ago

What is the idea or deployment goal?

https://github.com/coollabsio/coolify/blob/5d62a46a16f252e6ece4d25fe56838e99883d91b/app/Actions/Proxy/StartProxy.php#L31

From the docker command alone I would assume we need to change if ($server->isSwarm()) { to if ($server->isSwarmManager()) {

XenonR commented 2 weeks ago

Related to #4130 After correcting this issue we encounter traefik:v2 configuration but want to use traefik:v3.1

XenonR commented 2 weeks ago

After addressing #4146 and #4130 the proxy is able to start at a docker manager, but still fails on a worker with:

 traefik Pulling 
 traefik Pulled 
 Container proxy-traefik-1  Recreate
 Container proxy-traefik-1  Recreated
 Container proxy-traefik-1  Starting
Error response from daemon: container aefeb1567f40d5e71bd78c5c348146c3a8851eaf1dfac6aeaa7d60a159066e06: endpoint join on GW Network failed: driver failed programming external connectivity on endpoint gateway_78aa55990e7a (279cdf7bc78f9f8f58e27930e1ef66c3d6b07ae73e90e27d7ed2c65fc2fa2959): failed to bind port 0.0.0.0:80/tcp: Error starting userland proxy: listen tcp4 0.0.0.0:80: bind: address already in use

netstat

tcp6       0      0 :::80                   :::*                    LISTEN      0          331866     1685/dockerd
tcp6       0      0 :::443                  :::*                    LISTEN      0          331327     1685/dockerd
tcp6       0      0 :::8080                 :::*                    LISTEN      0          331358     1685/dockerd

On worker nodes it should not be required to deploy the proxy. As long as the ingress routing mesh is used the proxy of the manager will also be reachable from the workers.

I need someone who explains the desired design to continue.

Development branch: https://github.com/bit-in-gmbh/coolify/tree/swarm