diff --git a/docker-compose.yml b/docker-compose.yml index bb85ac3..fab095d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,6 +11,8 @@ services: configs: - source: app_config target: /data/application.yaml + environment: + REPLICA: "{{.Task.Slot}}" labels: - "traefik.http.routers.expertisa-master.rule=HostRegexp(`(?i)master\\..+`)" @@ -18,8 +20,8 @@ services: - "traefik.http.services.expertisa-master.loadbalancer.healthcheck.path=/health/readiness" - "traefik.http.services.expertisa-master.loadbalancer.healthcheck.interval=5s" - - "traefik.http.routers.expertisa-master-{{.Task.Slot}}.rule=HostRegexp(`(?i)master-{{.Task.Slot}}\\..+`)" - - "traefik.http.routers.expertisa-master-{{.Task.Slot}}.tls=true" + - "traefik.http.routers.expertisa-master-${REPLICA}.rule=HostRegexp(`(?i)master-${REPLICA}\\..+`)" + - "traefik.http.routers.expertisa-master-${REPLICA}.tls=true" environment: JAVA_TOOL_OPTIONS: "-XX:MaxRAMPercentage=90"