Every time I update a service that was already in production using traefik (docker-compose pull and docker-compose up -d) my service is down, when I try to access it the message "Gateway Timeout" appears, below my docker-compose.yml. But when I access the traefik log it's like everything is ok, no error message appears.
version: '3.3'
services:
serv1:
image: image-stable
restart: always
environment:
- DATABASE_URL=jdbc:postgresql://ip:port/
- DATABASE_NAME=name
- DATABASE_USER=user
- DATABASE_PASSWORD=pass
- DATABASE_PASSWORD_MASTER=pass
- DATABASE_DRIVER=org.postgresql.Driver
volumes:
- ./credentials:/root/.aws/credentials
labels:
- "traefik.enable=true"
- "traefik.http.routers.serv1_router_http.rule=Host(`url.com`,`url.com.br`,`url.co`}"
- "traefik.http.routers.serv1_router_http.entrypoints=web"
- "traefik.http.middlewares.serv1_https_redirect.redirectscheme.scheme=https"
- "traefik.http.routers.serv1_router_http.middlewares=serv1_https_redirect"
- "traefik.http.routers.serv1_router_https.rule=Host(`url.com`,`url.com.br`,`url.co`}"
- "traefik.http.routers.serv1_router_https.entrypoints=websecure"
- "traefik.http.routers.serv1_router_https.tls.certresolver=myhttpchallenge"
- "traefik.http.routers.serv1_router_https.tls=true"
- "traefik.http.services.serv1_router_https.loadbalancer.server.port=8080"
networks:
- web
- default
traefik:
image: "traefik:v2.0.0-rc3"
command:
- "--log.level=DEBUG"
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
- "--entrypoints.websecure.address=:443"
- "--certificatesresolvers.myhttpchallenge.acme.httpchallenge=true"
- "--certificatesresolvers.myhttpchallenge.acme.httpchallenge.entrypoint=web"
- "--certificatesresolvers.myhttpchallenge.acme.email=email@email.com.br"
- "--certificatesresolvers.myhttpchallenge.acme.storage=/letsencrypt/acme.json"
ports:
- "80:80"
- "443:443"
volumes:
- "./letsencrypt:/letsencrypt"
- "/var/run/docker.sock:/var/run/docker.sock:ro"
networks:
- web
networks:
web:
external: true