coolify icon indicating copy to clipboard operation
coolify copied to clipboard

[Bug]: Env vars interpolation is broken

Open Kocal opened this issue 1 year ago • 3 comments

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)

  • Create a new project and environment
  • Create an env var
  • Create an env var that use the other
  • Deploy
  • printenv in the container, and see the 2nd env var is not correctly interpolated

Exception or Error

No response

Version

v4.0.0-beta.290

Kocal avatar May 30 '24 07:05 Kocal

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

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

Achder avatar Jun 13 '24 14:06 Achder

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

lorenzomigliorero avatar Jul 11 '24 18:07 lorenzomigliorero

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

madebylydia avatar Jul 24 '24 22:07 madebylydia

I think this has been fixed already. If not, please reopen the issue or open a new one.

andrasbacsai avatar Mar 25 '25 14:03 andrasbacsai