You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Maybe I missed it in the doc, and in the example the docker-compose has hardcoded env. In most setups we need to specify differente ENV based on the environment. Is there a way to do this?
Describe the solution you'd like
Ability to pass environment variables or file to the preevy up command and/or GitHub action
Describe alternatives you've considered
Configuring env on third party service and retrieve them on startup. Not sutable for every project
Additional context
No response
Add screenshots
No response
Record
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
Hey @matteobad, in Docker Compose, you can pass environment variables in multiple ways. Preevy supports them all:
environment:
# Assign a fixed value to MY_ENV_VAR
- MY_ENV_VAR=abc# Load the value of EXTERNAL_ENV_VAR from the host environment# and assign it to MY_ENV_VAR in the container
- MY_ENV_VAR=${EXTERNAL_ENV_VAR}# Pass MY_ENV_VAR directly from the host environment to the container# (equivalent to MY_ENV_VAR=${MY_ENV_VAR} if MY_ENV_VAR exists in the host environment)
- MY_ENV_VAR# Set MY_ENV_VAR to the value from the host if it exists, # otherwise use "abc" as a default value in the container
- MY_ENV_VAR=${MY_ENV_VAR:-abc}
In addition, docker compose support loading .env files:
I'm already using ENV in my docker-compose file, I just wasn't sure that running the preevy up command would make the ENVs available, and I couldn't find an example without hardcoded vars.
Maybe we could make it more clear in the docs somewhere? Anyway thanks for the great work!
What feature?
Maybe I missed it in the doc, and in the example the docker-compose has hardcoded
env
. In most setups we need to specify differente ENV based on the environment. Is there a way to do this?Describe the solution you'd like
Ability to pass environment variables or file to the
preevy up
command and/or GitHub actionDescribe alternatives you've considered
Configuring env on third party service and retrieve them on startup. Not sutable for every project
Additional context
No response
Add screenshots
No response
Record
The text was updated successfully, but these errors were encountered: