diff --git a/docker-compose.yml b/docker-compose.yml index 506676d..9202b13 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,12 +4,20 @@ services: ports: - "8000:8000" env_file: - # Absolute path, deliberately outside this repo checkout: the stack - # manager re-clones this directory fresh on every deploy, which would - # silently wipe a .env (or bind-mounted data) placed inside it. - - /Users/davidlawler/docker/power-compare-data/.env + # `docker compose` here runs *inside* the stack manager's own + # container (Docker-outside-of-Docker via the mounted host socket), + # so this path is resolved against ITS filesystem, not the host's -- + # it must live under the stack manager's own data mount, in a + # directory outside the git checkout that gets wiped/re-cloned each + # deploy. On this host that's /Users/davidlawler/docker/dockhand, + # bind-mounted into the stack manager container as /app/data. + - /app/data/power-compare-persistent/.env environment: - DB_PATH=/data/power_compare.db volumes: + # Bind-mount SOURCE paths, by contrast, are resolved by the real + # Docker daemon against the actual host filesystem (the daemon isn't + # inside the stack manager's container) -- so this one stays a real + # host path, not an /app/data/... one. - /Users/davidlawler/docker/power-compare-data/data:/data restart: unless-stopped