TraefikIntegration #5

Merged
luke-else merged 43 commits from TraefikIntegration into master 2023-08-08 19:50:40 +00:00
Showing only changes of commit f66d90eef7 - Show all commits

View File

@ -1,65 +1,29 @@
version: '3.8' version: "3.8"
services: services:
#traefik (80, 443, 8080)
traefik: traefik:
image: 'traefik:latest' image: "traefik:latest"
container_name: traefik container_name: "traefik"
volumes:
- ./letsencrypt:/letsencrypt
- /var/run/docker.sock:/var/run/docker.sock
- ./dynamic.yaml:/dynamic.yaml
networks:
## Traefik is sat on every network to allow exposure ##
- traefik
- frontend
- development
- backend
- bitwarden
- services
ports:
## These ports are in format <host-port>:<container-port> ##
- '80:80' # Public HTTP Port
- '443:443' # Public HTTPS Port
- '8080:8080' # Dashboard Port
command: command:
## General Settings ## - "--api.dashboard=true"
- --api.insecure=true - "--providers.docker=true"
- --api.dashboard=true - "--providers.docker.exposedbydefault=false"
- --api.debug=true - "--entrypoints.web.address=:80"
## Log Settings ## - "--entrypoints.websecure.address=:443"
- --log.level=DEBUG # <== Setting the level of the logs from traefik - "--certificatesresolvers.myresolver.acme.tlschallenge=true"
## Provider Settings ## - "--certificatesresolvers.myresolver.acme.email=contact@luke-else.co.uk"
- --providers.docker=true - "--certificatesresolvers.myresolver.acme.storage=/letsencrypt/acme.json"
- --providers.docker.exposedbydefault=false ports:
- --providers.file.filename=/dynamic.yaml - "80:80"
## Entrypoints Settings ## - "443:443"
- --entrypoints.http.address=:80 volumes:
- --entrypoints.https.address=:443 - "./letsencrypt:/letsencrypt"
## Certificate Settings ## - "/var/run/docker.sock:/var/run/docker.sock:ro"
- --certificatesresolvers.mytlschallenge.acme.tlschallenge=true
- --certificatesresolvers.mytlschallenge.acme.email=contact@luke-else.co.uk
- --certificatesresolvers.mytlschallenge.acme.storage=/letsencrypt/acme.json
labels: labels:
## Exposing API Dashboard Service ## - "traefik.enable=true"
- traefik.enable=true - "traefik.http.routers.traefik.rule=Host(`traefik.luke-else.co.uk`)"
- traefik.http.routers.api.rule=Host("traefik.luke-else.co.uk") - "traefik.http.routers.traefik.entrypoints=websecure"
- traefik.http.routers.api.service=api@internal - "traefik.http.routers.traefik.service=api@internal"
restart: unless-stopped - "traefik.http.routers.traefik.tls.certresolver=myresolver"
# - "traefik.http.routers.traefik.middlewares=traefik-auth"
# - "traefik.http.middlewares.traefik-auth.basicauth.users=user:$$2y$$05$$6m8MvyzgJ4Kl7/3rL4X6VurX1huMas8a7oPB3xRfBjFbGCR8MUi7W"
## All Networks for child containers - All containers depend on this container being spun up ## restart: unless-stopped
networks:
traefik:
name: traefik
frontend:
name: frontend
development:
name: development
backend:
name: backend
bitwarden:
name: bitwarden
services:
name: services