coollabsio / coolify

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

[Bug]: Network setting do not apply on apps created from templates #4276

Open mr47 opened 1 day ago

mr47 commented 1 day ago

Error Message and Logs

Creating grafana for example (no modification was done to template) exept Image Docker-compose (deployable) Image

Setting option connect to predefined networks have no effect. (its already set)

Steps to Reproduce

  1. Create a grafana app
  2. Add coolify network by hand using edit / setting connect to predefined network
  3. Check deployable docker-compose.yaml
  4. Observe absence of networks

PS: Maybe its merging object problem ?

Example Repository URL

No response

Coolify Version

v4.0.0-beta.367

Are you using Coolify Cloud?

No (self-hosted)

Operating System and Version (self-hosted)

TrueNas ElectricEel-24.10.0.2

Additional Information

No response

djsisson commented 1 day ago

@mr47 after ticking connect to predefined network and redeploying, are you saying if you run docker network inspect coolify you dont see the container?

mr47 commented 1 day ago

@djsisson yes, docker-compose.yaml deployable does not contain coolify as network

djsisson commented 1 day ago

@mr47 it doesnt add it to compose, it manaully adds it to the network

mr47 commented 1 day ago

@djsisson yeah but that a problem when I wanna add for example other custom defined network not coolify for example, its confusing that there is no network section, and even docker-compose that saved inside /data/coolify have the same.

djsisson commented 1 day ago

@mr47 you need to add a top level network section if thats what you want, it does work when adding your own networks, see appwrite template for an example

mr47 commented 21 hours ago

@djsisson that's the issue coolify not sync docker compose with ui, so this behavior is magical.

Even if I add

networks:
   mynet: 
     name: myned
     external: true
services: 
    myService:
       network: 
          mynet: null

That will result in deployable docker-compose without network mynet

djsisson commented 8 hours ago

@mr47 can you paste link to your compose please