This commit is contained in:
Hubert Cornet 2024-03-31 20:46:34 +02:00
parent 96759080b9
commit d27af65678

View File

@ -0,0 +1,40 @@
# networks
networks:
docker-traefik_front_network:
external: true
# services
services:
### Portainer
portainer:
container_name: portainer-app
hostname: portainer-app
image: portainer/portainer-ce:latest
command: -H unix:///var/run/docker.sock
restart: always
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- portainer_data:/data
# ports:
# - 9000:9000
# - 9443:9443
networks:
- docker-traefik_front_network
labels:
- "traefik.enable=true"
- "traefik.docker.network=docker-traefik_front_network"
# HTTP
- "traefik.http.routers.portainer-http.rule=Host(`portainer.10.0.4.29.traefik.me`)"
- "traefik.http.routers.portainer-http.entrypoints=http"
# HTTPS
- "traefik.http.routers.portainer-https.rule=Host(`portainer.10.0.4.29.traefik.me`)"
- "traefik.http.routers.portainer-https.entrypoints=https"
- "traefik.http.routers.portainer-https.tls=true"
- "traefik.http.routers.portainer-https.service=portainer-https-service"
# Middleware
# Service
- "traefik.http.services.portainer-https-service.loadbalancer.server.port=9443"
# volumes
volumes:
portainer_data: