|
Hi everyone, I'm trying to enable Docker Swarm mode (docker stack deploy) for a Compose service in Dokploy in order to Context
What I've tried
Questions
What I'd like to achieve
I'd rather not move to a manual docker stack deploy workflow or migrate to k3s if Dokploy already supports Thanks a lot for any pointer! |
Replies: 1 comment 2 replies
|
The Compose Type setting (choosing between When set to Stack, Dokploy deploys using Important caveats for Stack mode:
Workaround if you need compose -p <appName> -f docker-compose.yml build && docker compose -f docker-compose.yml config | grep -v "^name:" > /tmp/stack-resolved.yml && docker stack deploy -c /tmp/stack-resolved.yml <appName> --prune --with-registry-auth && docker service update --force <appName>_<service>This builds locally, resolves env vars, strips the You can set a custom command in Advanced → Command on your Compose service page. To reply, just mention @dosu. Share context across your team and agents. Try Dosu. |
The Compose Type is set only at creation time — it's a dropdown in the "Add Compose" dialog when you first create the service. Once created, it cannot be changed and only appears as a read-only badge in the General tab under "Deploy Settings" [1] [2].
So if you created your Compose service with the default "Docker Compose" type, there's no way to switch it to "Stack" after the fact from the UI. You'd need to delete the compose service and recreate it, selecting "Stack" in the Compose Type dropdown during creation.
That said, keep in mind the Stack mode limitations I mentioned earlier (no
builddirective, Traefik labels must go underdeploy.labels, etc.). If you need to build from source …