Skip to content

Commit d9b27fb

Browse files
committed
Give the compose stack an explicit project name
Compose derives the project name from the directory holding the file, which here is 'docker'. Anything else on the same host that keeps its compose file in a subdirectory of that name joins the same project, and a 'docker compose down' in either directory then stops both. That happened on the machine this is deployed to: a second stack's database container was registered under the same project as this dashboard, and running up -d here reported that stack's containers as orphans. Fixing only the deployment would have left this shipped to anyone who clones the repo, since they get the same directory name.
1 parent b77f47b commit d9b27fb

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

docker/docker-compose.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
# Without this, Compose names the project after the directory holding this
2+
# file, which is "docker". Any other project that also keeps its compose file
3+
# in a subdirectory called "docker" then lands in the same project, and
4+
# `docker compose down` in either one tears down both. That is not
5+
# hypothetical: it happened on the machine this is deployed to, where a second
6+
# stack's database container was registered under the same project as this
7+
# dashboard.
8+
name: quant-tools
9+
110
services:
211
dashboard:
312
image: quant-tools-dashboard:latest

0 commit comments

Comments
 (0)