A guide on how to use Docker Compose deployments with Coolify.
Docker Compose
based deployments, you need to understand how Docker Compose works with Coolify.
In all cases the Docker Compose (docker-compose.y[a]ml
) file is the single source of truth.
TEST
and ANOTHERTEST
environment variables inside Coolify, only TEST
will be used, as Coolify cannot determine where to add ANOTHERTEST
environment variable.
So if you want to use ANOTHERTEST
environment variable, you need to add it to the compose file.
Raw Compose Deployment
.
Connect to Predefined Network
option on your Service Stack
page, but this will make the internal Docker DNS not work as expected.
Here is an example. You have a stack with a postgres
database and a laravel
application. Coolify will rename your postgres
stack to postgres-<uuid>
and your laravel
stack to laravel-<uuid>
to prevent name collisions.
If you set Connect to Predefined Network
option on your laravel
stack, your laravel
application will be able to connect to your postgres
database, but you need to use the postgres-<uuid>
as your DB_HOST
environment variable.