containers / podman-compose

a script to run docker-compose.yml using podman
GNU General Public License v2.0
4.85k stars 463 forks source link

Load .env from Compose file's directory and cwd #956

Closed Genzer closed 1 week ago

Genzer commented 1 month ago

This commit loads dotenv .env (exactly that name) from the following location (the later takes precedence):

This preserves the behavior prior to 1.1.0 and to match with Docker Compose CLI.

Fix: https://github.com/containers/podman-compose/issues/937

Contributor Checklist:

If this PR adds a new feature that improves compatibility with docker-compose, please add a link to the exact part of compose spec that the PR touches.

All changes require additional unit tests.

Genzer commented 3 weeks ago

Hi @p12tic, thanks for reviewing!

I just committed the .env files used for manual testing. I was not aware they were ignored by the root .gitignore.

Regards, Genzer

p12tic commented 1 week ago

Rebased.