Skip to content

Commit

Permalink
compose: Unset 'container_name' for all services
Browse files Browse the repository at this point in the history
Remove hardcoded container names from all services in the docker-compose
files to allow multiple instances of the same service to run in parallel
without conflicts. This is important to allow both scaling individual
services as well as running multiple instances of the CMS stack
locally for testing purposes.

Signed-off-by: Phoevos Kalemkeris <[email protected]>
  • Loading branch information
phoevos committed Jan 15, 2025
1 parent ac0a8c1 commit f4fb0ff
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 31 deletions.
1 change: 0 additions & 1 deletion docker-compose-auth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ services:

auth-db:
image: postgres:14
container_name: cms_auth-db
restart: always
networks:
- cogstack-model-serve_cms
Expand Down
3 changes: 0 additions & 3 deletions docker-compose-celery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ services:
- HTTP_PROXY=$HTTP_PROXY
- HTTPS_PROXY=$HTTPS_PROXY
- NO_PROXY=$NO_PROXY
container_name: cms_worker
networks:
- cms
volumes:
Expand All @@ -32,7 +31,6 @@ services:
build:
context: ./
dockerfile: ./docker/celery/Dockerfile-Dashboard
container_name: cms_worker_dashboard
networks:
- cms
ports:
Expand All @@ -45,7 +43,6 @@ services:

redis:
image: redis:7
container_name: cms_redis
networks:
- cms
ports:
Expand Down
15 changes: 10 additions & 5 deletions docker-compose-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ services:
file: ./docker-compose.yml
service: medcat-snomed
image: cogstack-model-serve_medcat-snomed:dev
container_name: dev-cms_medcat-snomed
labels:
- org.cogstack.model-serve.env=dev
volumes:
- ${MODEL_PACKAGE_FULL_PATH}:/app/model/model.zip:ro
environment:
Expand Down Expand Up @@ -37,7 +38,8 @@ services:
file: ./docker-compose.yml
service: medcat-icd10
image: cogstack-model-serve_medcat-icd10:dev
container_name: dev-cms_medcat-icd10
labels:
- org.cogstack.model-serve.env=dev
environment:
- BASE_MODEL_FULL_PATH=$MODEL_PACKAGE_FULL_PATH
- AWS_ACCESS_KEY_ID=
Expand All @@ -64,7 +66,8 @@ services:
file: ./docker-compose.yml
service: de-identification
image: cogstack-model-serve_de-identification:dev
container_name: dev-cms_trf-deid
labels:
- org.cogstack.model-serve.env=dev
environment:
- BASE_MODEL_FULL_PATH=$MODEL_PACKAGE_FULL_PATH
- AWS_ACCESS_KEY_ID=
Expand All @@ -91,7 +94,8 @@ services:
file: ./docker-compose.yml
service: medcat-deid
image: cogstack-model-serve_medcat-deid:dev
container_name: dev-cms_medcat-deid
labels:
- org.cogstack.model-serve.env=dev
environment:
- BASE_MODEL_FULL_PATH=$MODEL_PACKAGE_FULL_PATH
- AWS_ACCESS_KEY_ID=
Expand All @@ -118,7 +122,8 @@ services:
file: ./docker-compose.yml
service: medcat-umls
image: cogstack-model-serve_medcat-umls:dev
container_name: dev-cms_medcat-umls
labels:
- org.cogstack.model-serve.env=dev
environment:
- BASE_MODEL_FULL_PATH=$MODEL_PACKAGE_FULL_PATH
- AWS_ACCESS_KEY_ID=
Expand Down
3 changes: 0 additions & 3 deletions docker-compose-log.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ services:

mongodb:
image: mongo:5.0
container_name: cms_mongodb
volumes:
- mongodb_data:/data/db
restart: always
Expand All @@ -20,7 +19,6 @@ services:

opensearch:
image: opensearchproject/opensearch:2.4.0
container_name: cms_opensearch
environment:
- OPENSEARCH_JAVA_OPTS=-Xms1g -Xmx1g
- bootstrap.memory_lock=true
Expand All @@ -47,7 +45,6 @@ services:

graylog:
image: graylog/graylog:5.0
container_name: cms_graylog
depends_on:
opensearch:
condition: "service_healthy"
Expand Down
9 changes: 3 additions & 6 deletions docker-compose-mlflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ services:

mlflow-db:
image: postgres:14
container_name: cms_mlflow-db
restart: always
networks:
- cogstack-model-serve_cms
Expand All @@ -24,7 +23,6 @@ services:

minio:
image: minio/minio:RELEASE.2022-06-30T20-58-09Z
container_name: cms_minio
restart: always
networks:
- cogstack-model-serve_cms
Expand Down Expand Up @@ -71,7 +69,6 @@ services:
- HTTP_PROXY=$HTTP_PROXY
- HTTPS_PROXY=$HTTPS_PROXY
- NO_PROXY=$NO_PROXY
container_name: cms_mlflow-ui
restart: always
networks:
- cogstack-model-serve_cms
Expand All @@ -80,7 +77,7 @@ services:
environment:
- MLFLOW_DB_USERNAME=$MLFLOW_DB_USERNAME
- MLFLOW_DB_PASSWORD=$MLFLOW_DB_PASSWORD
- MLFLOW_BACKEND_STORE_URI=postgresql://$MLFLOW_DB_USERNAME:$MLFLOW_DB_PASSWORD@cms_mlflow-db:5432/mlflow-backend-store
- MLFLOW_BACKEND_STORE_URI=postgresql://$MLFLOW_DB_USERNAME:$MLFLOW_DB_PASSWORD@mlflow-db:5432/mlflow-backend-store
- MLFLOW_TRACKING_URI=http://localhost:5000
- ARTIFACTS_DESTINATION=s3://cms-model-bucket
- MLFLOW_S3_ENDPOINT_URL=http://minio:9000
Expand Down Expand Up @@ -121,7 +118,6 @@ services:
- NO_PROXY=$NO_PROXY
profiles:
- wip
container_name: cms_mlflow-deployments
restart: always
networks:
- cogstack-model-serve_cms
Expand Down Expand Up @@ -153,7 +149,8 @@ services:
- NO_PROXY=$NO_PROXY
profiles:
- wip
container_name: cms_mlflow-${MODEL_NAME:-model}
labels:
- org.cogstack.model-serve.model-name=${MODEL_NAME:-model}
restart: always
networks:
- cogstack-model-serve_cms
Expand Down
4 changes: 0 additions & 4 deletions docker-compose-mon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ services:

prometheus:
image: prom/prometheus:v2.41.0
container_name: cms_prometheus
restart: always
networks:
- cogstack-model-serve_cms
Expand All @@ -29,7 +28,6 @@ services:

grafana:
image: grafana/grafana:9.3.2-ubuntu
container_name: cms_grafana
restart: always
networks:
- cogstack-model-serve_cms
Expand All @@ -51,7 +49,6 @@ services:

alertmanager:
image: prom/alertmanager:v0.25.0
container_name: cms_alertmanager
restart: always
networks:
- cogstack-model-serve_cms
Expand All @@ -73,7 +70,6 @@ services:

cadvisor:
image: gcr.io/cadvisor/cadvisor:v0.46.0
container_name: cms_cadvisor
restart: always
networks:
- cogstack-model-serve_cms
Expand Down
1 change: 0 additions & 1 deletion docker-compose-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ services:
- HTTP_PROXY=$HTTP_PROXY
- HTTPS_PROXY=$HTTPS_PROXY
- NO_PROXY=$NO_PROXY
container_name: cms_proxy
restart: always
networks:
- cogstack-model-serve_cms
Expand Down
6 changes: 0 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ services:
- HTTP_PROXY=$HTTP_PROXY
- HTTPS_PROXY=$HTTPS_PROXY
- NO_PROXY=$NO_PROXY
container_name: cms_medcat-snomed
restart: always
networks:
- cms
Expand Down Expand Up @@ -63,7 +62,6 @@ services:
- HTTP_PROXY=$HTTP_PROXY
- HTTPS_PROXY=$HTTPS_PROXY
- NO_PROXY=$NO_PROXY
container_name: cms_medcat-icd10
restart: always
networks:
- cms
Expand Down Expand Up @@ -113,7 +111,6 @@ services:
- HTTP_PROXY=$HTTP_PROXY
- HTTPS_PROXY=$HTTPS_PROXY
- NO_PROXY=$NO_PROXY
container_name: cms_trf-deid
restart: always
networks:
- cms
Expand Down Expand Up @@ -162,7 +159,6 @@ services:
- HTTP_PROXY=$HTTP_PROXY
- HTTPS_PROXY=$HTTPS_PROXY
- NO_PROXY=$NO_PROXY
container_name: cms_medcat-deid
restart: always
networks:
- cms
Expand Down Expand Up @@ -212,7 +208,6 @@ services:
- HTTP_PROXY=$HTTP_PROXY
- HTTPS_PROXY=$HTTPS_PROXY
- NO_PROXY=$NO_PROXY
container_name: cms_medcat-umls
restart: always
networks:
- cms
Expand Down Expand Up @@ -262,7 +257,6 @@ services:
- HTTP_PROXY=$HTTP_PROXY
- HTTPS_PROXY=$HTTPS_PROXY
- NO_PROXY=$NO_PROXY
container_name: cms_huggingface-ner
restart: always
networks:
- cms
Expand Down
6 changes: 4 additions & 2 deletions tests/load/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ version: "3"
services:
master:
image: locustio/locust:2.26.0
container_name: cms_load_master
labels:
- org.cogstack.model-serve.locust=master
networks:
- cogstack-model-serve_cms
ports:
Expand All @@ -25,7 +26,8 @@ services:

worker:
image: locustio/locust:2.26.0
container_name: cms_load_worker
labels:
- org.cogstack.model-serve.locust=worker
networks:
- cogstack-model-serve_cms
environment:
Expand Down

0 comments on commit f4fb0ff

Please sign in to comment.