added nginx to traefik migration changes and docs

This commit is contained in:
rezayaghobi-dev
2026-08-27 12:07:31 +03:30
parent 6f1431ad30
commit 00836e5b7c
36 changed files with 1229 additions and 74 deletions

View File

@@ -4,7 +4,31 @@ services:
container_name: portainer
restart: unless-stopped
ports:
- "9000:9000"
- "9001:9000" # keep for now (fallback)
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /home/rezayaghobi/docker/portainer/data:/data
networks:
- web_net
labels:
- "traefik.enable=true"
- "traefik.docker.network=web_net"
# HTTPS
- "traefik.http.routers.portainer.rule=Host(`portainer.home.server`)"
- "traefik.http.routers.portainer.entrypoints=websecure"
- "traefik.http.routers.portainer.tls=true"
- "traefik.http.routers.portainer.service=portainer"
- "traefik.http.routers.portainer.middlewares=security-headers@file"
# HTTP → HTTPS redirect
- "traefik.http.routers.portainer-http.rule=Host(`portainer.home.server`)"
- "traefik.http.routers.portainer-http.entrypoints=web"
- "traefik.http.routers.portainer-http.middlewares=redirect-to-https@file"
# Internal port (Portainer listens on 9000 inside the container)
- "traefik.http.services.portainer.loadbalancer.server.port=9000"
networks:
web_net:
external: true