homelab/bxl-nas/system.docker-compose.yaml

62 lines
2.1 KiB
YAML
Raw Normal View History

2023-01-02 19:40:01 +01:00
version: "3.7"
services:
traefik:
container_name: traefik
image: traefik:v2.9
command:
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--providers.docker.network=external"
2023-01-02 19:43:26 +01:00
- "--entrypoints.internal.address=:80"
- "--entrypoints.internalsecure.address=:443"
- "--entrypoints.internal.http.redirections.entryPoint.to=internalsecure"
- "--entrypoints.internal.http.redirections.entryPoint.scheme=https"
- "--entrypoints.internal.http.redirections.entryPoint.permanent=true"
2023-01-02 19:40:01 +01:00
- "--certificatesresolvers.http.acme.httpchallenge=true"
2023-01-02 19:43:26 +01:00
- "--certificatesresolvers.http.acme.httpchallenge.entrypoint=external"
2023-01-02 19:40:01 +01:00
- "--certificatesresolvers.http.acme.email=acme@bhasher.com"
- "--certificatesresolvers.http.acme.storage=acme.json"
2023-01-02 19:43:26 +01:00
- "--entrypoints.external.address=:81"
- "--entrypoints.externalsecure.address=:444"
- "--entrypoints.external.http.redirections.entryPoint.to=externalsecure"
- "--entrypoints.external.http.redirections.entryPoint.scheme=https"
- "--entrypoints.external.http.redirections.entryPoint.permanent=true"
2023-01-02 19:40:01 +01:00
environment:
- TZ=Europe/Paris
restart: always
ports:
- "80:80"
- "443:443"
2023-01-02 19:43:26 +01:00
- "81:81"
- "444:444"
2023-01-02 19:40:01 +01:00
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- type: bind
source: /mnt/Main/containers/traefik/acme.json
target: /acme.json
networks:
- external
2023-01-02 19:43:26 +01:00
portainerce:
container_name: portainerce
2023-01-02 19:40:01 +01:00
image: portainer/portainer-ce:latest
restart: on-failure
labels:
- "traefik.enable=true"
- "traefik.http.routers.portainer.rule=Host(`portainer.nas.bhasher.com`)"
2023-01-02 19:43:26 +01:00
- "traefik.http.routers.portainer.entrypoints=externalsecure,internalsecure"
2023-01-02 19:40:01 +01:00
- "traefik.http.services.portainer.loadbalancer.server.port=9000"
- "traefik.http.routers.portainer.tls=true"
- "traefik.http.routers.portainer.tls.certresolver=http"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
2023-01-02 19:43:26 +01:00
- /mnt/Main/containers/portainer:/data
2023-01-02 19:40:01 +01:00
networks:
- external
networks:
external:
name: external