Skip to content

Commit

Permalink
- add labels to syft's containers
Browse files Browse the repository at this point in the history
- only remove syft's containers when doing `hagrid land all`
  • Loading branch information
khoaguin committed Sep 29, 2023
1 parent 9f287b3 commit fc719f1
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
16 changes: 16 additions & 0 deletions packages/grid/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ services:
- "${HTTP_PORT}:81"
extra_hosts:
- "host.docker.internal:host-gateway"
labels:
- "orgs.openmined.syft=this is a syft proxy container"

# depends_on:
# - "docker-host"
Expand All @@ -51,6 +53,8 @@ services:
depends_on:
- proxy
network_mode: service:proxy
labels:
- "orgs.openmined.syft=this is a syft tailscale container"

frontend:
restart: always
Expand All @@ -72,6 +76,8 @@ services:
- VITE_PUBLIC_API_BASE_URL=${VITE_PUBLIC_API_BASE_URL}
extra_hosts:
- "host.docker.internal:host-gateway"
labels:
- "orgs.openmined.syft=this is a syft frontend container"

# redis:
# restart: always
Expand Down Expand Up @@ -131,6 +137,8 @@ services:
- ${BACKEND_STORAGE_PATH}:/storage
stdin_open: true
tty: true
labels:
- "orgs.openmined.syft=this is a syft backend container"

# backend_stream:
# restart: always
Expand Down Expand Up @@ -213,6 +221,8 @@ services:
- RELEASE=${RELEASE:-production}
- NETWORK_NAME=omnet
- STACK_API_KEY=$STACK_API_KEY
labels:
- "orgs.openmined.syft=this is a syft headscale container"

seaweedfs:
profiles:
Expand All @@ -233,6 +243,8 @@ services:
- seaweedfs-data-2:/data
- ./seaweedfs/filer.toml:/etc/seaweedfs/filer.toml
- ./seaweedfs/start.sh:/etc/seaweedfs/start.sh
labels:
- "orgs.openmined.syft=this is a syft seaweedfs container"

mongo:
image: "${MONGO_IMAGE}:${MONGO_VERSION}"
Expand All @@ -243,6 +255,8 @@ services:
volumes:
- mongo-data:/data/db
- mongo-config-data:/data/configdb
labels:
- "orgs.openmined.syft=this is a syft mongo container"

jaeger:
profiles:
Expand All @@ -266,6 +280,8 @@ services:
# - "9411:9411"
volumes:
- jaeger-data:/tmp
labels:
- "orgs.openmined.syft=this is a syft jaeger container"

volumes:
credentials-data:
Expand Down
2 changes: 1 addition & 1 deletion packages/hagrid/hagrid/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -3154,7 +3154,7 @@ def create_land_cmd(verb: GrammarVerb, kwargs: TypeDict[str, Any]) -> str:
if target == "all":
# land all syft nodes
if prune_volumes:
land_cmd = "docker rm `docker ps -aq` --force "
land_cmd = "docker rm `docker ps --filter label=orgs.openmined.syft -q` --force "
land_cmd += "&& docker volume rm "
land_cmd += "$(docker volume ls --filter label=orgs.openmined.syft -q)"
return land_cmd
Expand Down

0 comments on commit fc719f1

Please sign in to comment.