Jackson Hammond
01/16/2025, 11:41 PM--api-key
value as a secret that the compose file can pass on to the "command" to start the container.
This is what many examples of a docker compose file look like:
services:
typesense:
image: typesense/typesense:26.0
restart: on-failure
ports:
- "8108:8108"
volumes:
- ./typesense-data:/data
command: '--data-dir /data --api-key=xyz --enable-cors'
However, I do not want to hard code that --api-key
value into my production deployment. I've tried numerous ways of passing an environment or secret variable to that command
value of the compose file, but it seems like the value is always interpreted literally. Can anyone help me figure this out? Thank you!Jason Bosco
01/17/2025, 12:07 AMJackson Hammond
01/17/2025, 1:59 AM--api-key
value available as an env var in the container, I needed it available on my host instead.Elliot Sawyer
01/17/2025, 4:35 AM