[Bug]: compose deployment ignores includes
Error Message and Logs
docker-compose.yml:
include:
- compose/services.compose.yml
services:
api:
image: nginx # whatever
compose/services.compose.yml:
services:
postgres:
image: postgres:17
Coolify ignores included services and generates internal compose file only with ones specified directly in docker-compose.yml
Steps to Reproduce
- Create a compose setup splitted in several files with includes
- Deploy to coolify
Example Repository URL
No response
Coolify Version
v4.0.0-beta.418
Are you using Coolify Cloud?
No (self-hosted)
Operating System and Version (self-hosted)
Ubuntu 22.04
Additional Information
No response
@terion-name you need to use a custom compose command, for build/start since coolifys compose command uses -f, it means only the single file is passed in (the one you select)
if there is no build section in there, its ok to change start command to just docker compose up -d please note: this will break for preview deployments, since you won't know what the .env file is called since it's not the standard .env but .env-pr-xxx
@djsisson this kinda works, but this is just awful in many ways.
Starting with conceptually this is a compose feature that is critical for managing big projects, ending with that this breaks not only preview deployments, but debugging. after changing to this approach - it seems that paths and volumes messed up or something — and I simply can't debug this. Why? Because build log doesn't show any output of building/starting containers. I see:
Container so8w0o8ocgw0so048cow88ws-logto-1 Error
dependency failed to start: container so8w0o8ocgw0so048cow88ws-logto-1 is unhealthy
what error? I have no idea, because logs tab doesn't show services that are listed not in first file!
This is just unusable
yes coolify doesnt really support multiple docker compose files
if it just ran docker compose -f .$workdir$composeFile config --no-interpolate instead of just cat it would be fine i think (a full clone would be needed though i guess, as other files could be in other dirs maybe this is more work needed with git commands)
https://github.com/coollabsio/coolify/blob/96b3e269c57f332b48a6bd00f97c25492e2ec13a/app/Models/Application.php#L1441
https://github.com/coollabsio/coolify/blob/96b3e269c57f332b48a6bd00f97c25492e2ec13a/app/Models/Application.php#L1452
im not sure if this is ran elsewhere, but if someone wants to test ...