coollabsio / coolify

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

[Bug]: Env vars interpolation is broken #2316

Open Kocal opened 3 months ago

Kocal commented 3 months ago

Description

Hi :)

Today I've upgraded from v4.0.0-beta.264 to v4.0.0-beta.290, and my apps could not be deployed due to env vars not being interpolated anymore.

Given the following env vars:

DATABASE_URL=postgres://$POSTGRES_USER:$POSTGRES_PASSWORD@database:5432/$POSTGRES_DB?sslmode=disable&charset=utf8&serverVersion=16.2
POSTGRES_USER=user
POSTGRES_PASSWORD=password
POSTGRES_DB=db

If I run printenv in the PHP container for v4.0.0-beta.264, I see DATABASE_URL being correctly interpolated:

DATABASE_URL=postgres://user:password@database:5432/db?sslmode=disable&charset=utf8&serverVersion=16.2

But if I do the same for v4.0.0-beta.290, I see DATABASE_URL being wrongly interpolated:

DATABASE_URL=postgres://:@database:5432/?sslmode=disable&charset=utf8&serverVersion=16.2

Minimal Reproduction (if possible, example repository)

Exception or Error

No response

Version

v4.0.0-beta.290

Achder commented 3 months ago

I have a similar issue. I use this in my code:

image

But it's not interpolating, it's just printing $SOURCE_COMMIT

lorenzomigliorero commented 2 months ago

Same issue; the env variables seem to be handled as a Literal in all cases.

madebylydia commented 1 month ago

This is also reproducible with a Docker Compose file. Reproduction can be done using the following file: https://github.com/madebylydia/docker-files/blob/1d979fccbee5b4a9f237bf085ce681dde8e531b6/Netdata/compose.yml