Deploying with Docker Compose
signoz
HOBBYOP

7 months ago

Hey Team, I have a Docker compose file that also mounts the config files. Because of this, I can't deploy it without removing those volume mounts, so I want to know if there's any way other than rebuilding Docker images with the config files and then using Docker compose.

$10 Bounty

2 Replies

signoz
HOBBYOP

7 months ago

9771cfa5-6e9f-430c-9165-7944f325a81e


colinrm000
HOBBY

7 months ago

Bind-mounts point to files on your machine, a remote host can’t see them, so the deploy fails.

You’ve only got three practical fixes:

  1. COPY the config files into the image during build.

  2. Pass the config as env-vars/secrets provided by the platform.

  3. Use a “prod” compose file without the mounts (docker-compose.yml + docker-compose.prod.yml).

There’s no flag that makes the cloud read ./config.yml from your computer, pick one of the above and this should hopefully solve your issue! slightly_smiling_face emoji


Loading...