Im using docker-compose, and Im using env file with my local variables. I need to pass array variable. I have tried:
TAGS="12345","67890"
or
TAGS=["12345","67890"]
or
TAGS=("12345" "67890")
Im getting always error:
List(WrongType(STRING,Set(LIST, OBJECT),Some(ConfigValueLocation(file:/src/target/scala-2.12/classes/application.conf,86))
Any idea how to achieve this ?
Docker Compose allows us to pass environment variables in via command line or to define them in our shell. However, it's best to keep these values inside the actual Compose file and out of the command line.
env in your project, it's only used to put values into the docker-compose. yml file which is in the same folder. Those are used with Docker Compose and Docker Stack.
As Confidence mentioned above, write a comma separated string:
TAGS=12345,67890
Then in your application (Python for instance):
os.getenv('TAGS').split(',')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With