api is up and serving, but something's deeply wrong: it's reading and writing the staging database from what's supposed to be a production container. No crash, no error — it's just behaving as if it were staging. The image is the right one (myapp:latest). Find out why a prod container is running staging's configuration, and fix it so it uses prod config.
api — myapp:latest, Up, on 8080, config bind-mounted at/app/config.yaml.
/srv/configs/ (prod.yaml, staging.yaml).$ docker logs api | grep environment
[config] loaded: environment=staging
$ docker inspect -f '{{range .Mounts}}{{.Source}} -> {{.Destination}}{{end}}' api
/srv/configs/staging.yaml -> /app/config.yaml
You've solved it when:
/app/config.yaml
(/srv/configs/staging.yaml instead of prod.yaml) — not a bad image,
not an env var, not a code bug.
api back up running with the prod config mounted/srv/configs/prod.yaml -> /app/config.yaml).
docker CLI only.api running with prod.yaml mounted at /app/config.yaml.