Skip to content

Old instance 50% of the time #32

@bartoszkrawczyk2

Description

@bartoszkrawczyk2

Hi

I'm using Traefik and after running docker rollout [name] every other request is routed to the old instance, until it's removed. For fast starting apps it's probably not an issue, but some apps can take quite some time to start and 50% of users would see nothing (or bad gateway error) during deployment.

I'm guessing that this is probably more Traefik's issue than docker-rollout, but maybe someone here knows how to help?

This is my compose file:

services:
  traefik:
    image: traefik:v3.0
    command:
      - "--api.insecure=true"
      - "--providers.docker"
      - "--entrypoints.web.address=:80"
      - "--providers.docker.exposedbydefault=false"
      - "--accesslog=true"
      - "--log.level=DEBUG"
    ports:
      - "80:80"
      - "8080:8080"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock

  whoami:
    image: traefik/whoami
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.whoami.entrypoints=web"
      - "traefik.http.routers.whoami.rule=Host(`whoami.localhost`)"

  app:
    build:
      context: .
      dockerfile: Dockerfile
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.app.entrypoints=web"
      - "traefik.http.routers.app.rule=Host(`app.localhost`)"
    restart: unless-stopped

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions