# Why can't I get access to this stack?

**URL:** <https://community.traefik.io/t/why-cant-i-get-access-to-this-stack/23993>\
**Category:** Traefik v3 (latest)\
**Tags:** docker\
**Created:** [August 13, 2024, 5:48pm UTC](https://community.traefik.io/t/why-cant-i-get-access-to-this-stack/23993 "2024-08-13T17:48:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![csaeum](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/csaeum/32/1669_2.png) [@csaeum](https://community.traefik.io/u/csaeum)\
**Post date:** [August 13, 2024, 5:48pm UTC](https://community.traefik.io/t/why-cant-i-get-access-to-this-stack/23993/1 "2024-08-13T17:48:09Z")

</div>

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.

```auto
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}

```

---

<div class="post-metadata">

**Author:** ![csaeum](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/csaeum/32/1669_2.png) [@csaeum](https://community.traefik.io/u/csaeum)\
**Post date:** [August 13, 2024, 6:18pm UTC](https://community.traefik.io/t/why-cant-i-get-access-to-this-stack/23993/2 "2024-08-13T18:18:29Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![csaeum](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/csaeum/32/1669_2.png) [@csaeum](https://community.traefik.io/u/csaeum)\
**Post date:** [August 13, 2024, 6:36pm UTC](https://community.traefik.io/t/why-cant-i-get-access-to-this-stack/23993/3 "2024-08-13T18:36:49Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/containo/original/2X/b/bd81ebdb578656e76e56ff3cc3eed021d3ba132d.png) [@system](https://community.traefik.io/u/system)\
**Post date:** [August 16, 2024, 6:37pm UTC](https://community.traefik.io/t/why-cant-i-get-access-to-this-stack/23993/4 "2024-08-16T18:37:49Z")

</div>

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