Reading docker-compose environment variables in application code -
maybe i'm being really dumb , not understanding properly; want define docker-compose.yml
file so:
web: ... environment: foo: bar bar: foo
and want expose environment variables runtime applications run inside container (i guess mapping them shell variables?).
what's best way achieve this?
i think have minor syntax issue in yml, try changing to:
web: ... environment: - foo=bar - bar=foo
you should able access variables in code expected.
Comments
Post a Comment