2021-08-22 16:11:05 +00:00
|
|
|
version: '3'
|
|
|
|
|
|
|
|
services:
|
|
|
|
traefik:
|
|
|
|
image: traefik:latest
|
|
|
|
container_name: traefik
|
|
|
|
restart: unless-stopped
|
|
|
|
ports:
|
|
|
|
- '80:80'
|
2021-08-30 13:08:38 +00:00
|
|
|
- '443:443/tcp'
|
|
|
|
- '443:443/udp'
|
2021-08-22 16:11:05 +00:00
|
|
|
environment:
|
|
|
|
- TZ=Europe/Helsinki
|
|
|
|
security_opt:
|
|
|
|
- no-new-privileges:true
|
|
|
|
networks:
|
|
|
|
- proxy
|
|
|
|
volumes:
|
|
|
|
- /etc/localtime:/etc/localtime:ro
|
|
|
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
2021-08-22 16:23:07 +00:00
|
|
|
- /docker/traefik/traefik/traefik.yml:/traefik.yml:ro
|
2021-08-22 16:50:35 +00:00
|
|
|
- /docker/traefik/traefik/dashboard-users:/dashboard-users:ro
|
2021-08-22 16:23:07 +00:00
|
|
|
- /docker/traefik/traefik/acme.json:/acme.json
|
|
|
|
- /docker/traefik/traefik/log:/var/log
|
2021-08-22 16:11:05 +00:00
|
|
|
labels:
|
2021-08-30 13:08:38 +00:00
|
|
|
# Serve dashboard
|
2021-08-22 16:11:05 +00:00
|
|
|
- 'traefik.enable=true'
|
|
|
|
- 'traefik.http.routers.redirect.entrypoints=http'
|
|
|
|
- 'traefik.http.routers.redirect.rule=Host(`traefik.korhonen.cc`)'
|
|
|
|
- 'traefik.http.middlewares.http2https.redirectscheme.scheme=https'
|
|
|
|
- 'traefik.http.routers.redirect.middlewares=http2https'
|
|
|
|
|
|
|
|
- 'traefik.http.routers.dashboard.entrypoints=https'
|
|
|
|
- 'traefik.http.routers.dashboard.rule=Host(`traefik.korhonen.cc`)'
|
|
|
|
- 'traefik.http.middlewares.dashboard-auth.basicauth.usersfile=/dashboard-users'
|
|
|
|
- 'traefik.http.routers.dashboard.middlewares=dashboard-auth'
|
|
|
|
- 'traefik.http.routers.dashboard.service=api@internal'
|
|
|
|
|
|
|
|
fail2ban:
|
|
|
|
image: crazymax/fail2ban:latest
|
|
|
|
container_name: fail2ban
|
|
|
|
restart: unless-stopped
|
|
|
|
network_mode: "host"
|
|
|
|
cap_add:
|
|
|
|
- NET_ADMIN
|
|
|
|
- NET_RAW
|
2021-08-22 16:16:06 +00:00
|
|
|
environment:
|
|
|
|
- TZ=Europe/Helsinki
|
2021-08-22 16:11:05 +00:00
|
|
|
volumes:
|
2021-08-22 16:16:06 +00:00
|
|
|
- /etc/localtime:/etc/localtime:ro
|
2021-08-22 16:23:07 +00:00
|
|
|
- /docker/traefik/traefik/log:/var/log/traefik:ro
|
|
|
|
- /docker/traefik/fail2ban:/data
|
2021-08-22 16:11:05 +00:00
|
|
|
- /docker/gitea/gitea/log/gitea.log:/var/log/gitea:ro
|
2021-08-22 16:50:35 +00:00
|
|
|
- /docker/homeautomation/home-assistant/home-assistant.log:/var/log/hass
|
|
|
|
- /mnt/Storage/Nextcloud/nextcloud.log:/var/log/nextcloud:ro
|
2021-08-22 16:11:05 +00:00
|
|
|
networks:
|
|
|
|
proxy:
|
|
|
|
external: true
|