Why can't I get access to this stack?

I have this stack:
If I start the two containers individually, I get SSL and they are accessible. But if I do it like in this Docker File, i.e. both at once, then it doesn't work.

If I shut it down, I can see one of the containers briefly in Traefik, but both together only if I split the stack into 2 stacks.

version: '3.9'

services:
  gtm-tag-server:
    image: gcr.io/cloud-tagging-10302018/gtm-cloud-image:stable
    container_name: ${COMPOSE_PROJECT_NAME}-GTM
#    depends_on:
#      - gtm-preview-server
    environment:
      ENVIRONMENT: production
      CONTAINER_CONFIG: ${CONTAINER_CONFIG}
      PREVIEW_SERVER_URL: https://${PREVIEW_SERVER_URL}
      RUN_AS_PREVIEW_SERVER: 'false'
    labels:
      - traefik.enable=true
      - traefik.docker.network=${PROXY_NETWORK}
      - traefik.http.routers.${COMPOSE_PROJECT_NAME}.rule=${HOSTRULEGTM}
      - traefik.http.routers.${COMPOSE_PROJECT_NAME}.service=${COMPOSE_PROJECT_NAME}_Service
      - traefik.http.services.${COMPOSE_PROJECT_NAME}_Service.loadBalancer.server.port=8080
    networks:
      - default
      - ${PROXY_NETWORK}
    restart: ${RESTART}

  gtm-preview-server:
    image: gcr.io/cloud-tagging-10302018/gtm-cloud-image:stable
    container_name: ${COMPOSE_PROJECT_NAME}-GTM-Preview
    environment:
      ENVIRONMENT: preview
      CONTAINER_CONFIG: ${CONTAINER_CONFIG}
      RUN_AS_PREVIEW_SERVER: 'true'
    labels:
      - traefik.enable=true
      - traefik.docker.network=${PROXY_NETWORK}
      - traefik.http.routers.${COMPOSE_PROJECT_NAME}.rule=${HOSTRULEPREVIEW}
      - traefik.http.routers.${COMPOSE_PROJECT_NAME}.service=${COMPOSE_PROJECT_NAME}_Service
      - traefik.http.services.${COMPOSE_PROJECT_NAME}_Service.loadBalancer.server.port=8080
    networks:
      - default
      - ${PROXY_NETWORK}
    restart: ${RESTART}

networks:
  traefik_proxy:
    external: true
    name: ${PROXY_NETWORK}

Regardless of whether I include the depends-on or not, I see the preview container briefly in Traefik and then it's gone again.

OK, found the rules were the same. After adjusting it works

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.