Skip to content

Commit

Permalink
Cleanup docker-compose configs (#42)
Browse files Browse the repository at this point in the history
* Replace traefik-specific labels with EXPOSE

* Remove unnecessary default
  • Loading branch information
ivan-c authored Nov 26, 2024
1 parent 9c9c45f commit aec3538
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions dev/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ services:
- traefik.http.routers.cpro-${COMPOSE_PROJECT_NAME}.rule=Host(`${BASE_DOMAIN}`)

- traefik.http.routers.cpro-${COMPOSE_PROJECT_NAME}.entrypoints=websecure
- traefik.http.routers.cpro-${COMPOSE_PROJECT_NAME}.tls=true
- traefik.http.routers.cpro-${COMPOSE_PROJECT_NAME}.tls.certresolver=letsencrypt

# cPRO does not EXPOSE the ports it listens on, requiring explicit traefik configuration
# TODO add EXPOSE directive to Dockerfiles
- traefik.http.services.cpro-${COMPOSE_PROJECT_NAME}.loadbalancer.server.port=80
# cPRO does not EXPOSE the ports it listens on
# TODO add EXPOSE directive to Dockerfiles
expose:
- 80
networks:
- ingress
- internal
Expand Down Expand Up @@ -108,16 +108,14 @@ services:
aliases:
- fhir-internal
ingress:
expose:
- 8080
labels:
- traefik.enable=true
- traefik.http.routers.fhir-${COMPOSE_PROJECT_NAME}.rule=Host(`fhir.${BASE_DOMAIN}`)
- traefik.http.routers.fhir-${COMPOSE_PROJECT_NAME}.entrypoints=websecure
- traefik.http.routers.fhir-${COMPOSE_PROJECT_NAME}.tls=true
- traefik.http.routers.fhir-${COMPOSE_PROJECT_NAME}.tls.certresolver=letsencrypt

# Hapi does not EXPOSE the ports it listens on, requiring explicit traefik configuration
- traefik.http.services.fhir-${COMPOSE_PROJECT_NAME}.loadbalancer.server.port=8080

keycloak:
# use tini as init
init: true
Expand All @@ -126,7 +124,6 @@ services:
- traefik.enable=true
- traefik.http.routers.keycloak-${COMPOSE_PROJECT_NAME}.rule=Host(`keycloak.${BASE_DOMAIN}`)
- traefik.http.routers.keycloak-${COMPOSE_PROJECT_NAME}.entrypoints=websecure
- traefik.http.routers.keycloak-${COMPOSE_PROJECT_NAME}.tls=true
- traefik.http.routers.keycloak-${COMPOSE_PROJECT_NAME}.tls.certresolver=letsencrypt
command:
# https://www.keycloak.org/server/importExport#_importing_a_realm_during_startup
Expand Down Expand Up @@ -184,7 +181,6 @@ services:
- traefik.enable=true
- traefik.http.routers.fhir-auth-${COMPOSE_PROJECT_NAME}.rule=Host(`fhir-auth.${BASE_DOMAIN}`)
- traefik.http.routers.fhir-auth-${COMPOSE_PROJECT_NAME}.entrypoints=websecure
- traefik.http.routers.fhir-auth-${COMPOSE_PROJECT_NAME}.tls=true
- traefik.http.routers.fhir-auth-${COMPOSE_PROJECT_NAME}.tls.certresolver=letsencrypt

# TODO review if necessary for shl-creator service in same deploy
Expand Down Expand Up @@ -218,7 +214,6 @@ services:
- traefik.enable=true
- traefik.http.routers.shl-creator-${COMPOSE_PROJECT_NAME}.rule=Host(`shl-creator.${BASE_DOMAIN}`)
- traefik.http.routers.shl-creator-${COMPOSE_PROJECT_NAME}.entrypoints=websecure
- traefik.http.routers.shl-creator-${COMPOSE_PROJECT_NAME}.tls=true
- traefik.http.routers.shl-creator-${COMPOSE_PROJECT_NAME}.tls.certresolver=letsencrypt
networks:
- ingress
Expand All @@ -231,7 +226,6 @@ services:
- traefik.enable=true
- traefik.http.routers.shl-server-${COMPOSE_PROJECT_NAME}.rule=Host(`shl-server.${BASE_DOMAIN}`)
- traefik.http.routers.shl-server-${COMPOSE_PROJECT_NAME}.entrypoints=websecure
- traefik.http.routers.shl-server-${COMPOSE_PROJECT_NAME}.tls=true
- traefik.http.routers.shl-server-${COMPOSE_PROJECT_NAME}.tls.certresolver=letsencrypt
volumes:
- shl-server-data:/app/db
Expand Down

0 comments on commit aec3538

Please sign in to comment.