Docker compose help

Hi All,

Just wanting to know if something is possible or not regarding docker compose. Probably best explained with an example.

    environment:
      HOST: ${URL}
      PORT: ${PORT_LOCAL}
      SSL_CERT_FILE: ${DOCKER_SECRETS_DIR}/ssl_cert
      SSL_KEY_FILE: ${DOCKER_SECRETS_DIR}/ssl_key

So more or less, is it possible to translate this into dobbler? From what i can tell, dobbler can’t handle concatenations like for the SSL_CERT_FILE?

Also, would i not be able to do a key/value pair like what HOST is doing?

Cheers

Hey @callum.rosel and welcome to the Doppler community!

So the ${VAR} syntax means that environment variables are substituted in the context of the host.

So long as all of the variables you have in your docker-compose.yml file are in Doppler, everything should work as expected using:

doppler run -- docker-compose up

If you’re seeking info related to using certificates in PEM format with Docker Compose, check out our related blog post at Doppler: Using Doppler with Docker Compose for TLS and SSL Certificates in PEM Format