-
Notifications
You must be signed in to change notification settings - Fork 310
Support passing custom env-file? #134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Yes, that should be possible by modifying testcontainers-python/testcontainers/compose.py Lines 82 to 87 in bc969c5
Contributions welcome! |
Hey - I can tackle this. I've been looking to contribute to open source. Will write an implementation and tests. testcontainers-python/testcontainers/compose.py Lines 76 to 80 in bc969c5
|
* adding support for passing custom env-file (#134) * adding support for passing env-file to DockerCompose (#134) * fixed flake8 * trigger Gihub Actions again Co-authored-by: Anton Petrosyuk <[email protected]>
Closed in #135. |
Hi,
I came across this library and it seems very useful for running integration tests. My current
docker-compose.yml
make use of the.env
file to pass in various environment variables. However, for integration tests I want to use a different.env
file. Using docker-compose from the shell I can just dodocker-compose --env-file .env_test up
.Would it be possible to support a
env_file
argument incompose.DockerCompose.__init__
which defaults to.env
but can be set to something else? That would help me alot, because the only alternative I see is to make a second docker-compose.yml file and specify a separate env_file for each service which is not very pretty.The text was updated successfully, but these errors were encountered: