containers / containers/podman-compose

!override doesn't interpret variables from .env, takes them literally

Open
#1,313 0 comments 2 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
6.2k
Forks
622
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
When using `!override`, variables are taken literally instead of being read from .env.

**To Reproduce**
.env:
```bash
HTTP_PORT=8080
HTTP_BIND=
```

docker-compose.override.yml
```yml
nginx:
ports: !override
- ${HTTP_BIND:-0.0.0.0}:${HTTP_PORT:-80}:80
```

**Expected behavior**
```
$ podman-compose config
nginx:
ports:
- 0.0.0.0:8080:80
```

**Actual behavior**
```
$ podman-compose config
nginx:
ports:
- ${HTTP_BIND:-0.0.0.0}:${HTTP_PORT:-80}:80
```

Without !override it is interpreted, but the old values remain
```
nginx:
ports:
- :8080:80
- 0.0.0.0:8080:80
```

**Environment:**
- OS: Ubuntu 24.04
- podman version: 4.9.3
- podman compose version: 1.5.0

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.