Migration to newer dockge/compose stack

This commit is contained in:
Colin Hebert
2024-09-26 15:59:37 +02:00
parent 1d52e2ac75
commit dfe252e945
104 changed files with 752 additions and 666 deletions

View File

@@ -1,3 +1,5 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/compose-spec/compose-spec/master/schema/compose-spec.json
services:
traefik:
environment:

View File

@@ -1,33 +1,40 @@
name: reverse-proxy
# yaml-language-server: $schema=https://raw.githubusercontent.com/compose-spec/compose-spec/master/schema/compose-spec.json
services:
traefik:
hostname: traefik
extends:
file: ../compose.base.yaml
service: exposed-service
container_name: traefik
image: traefik
# TODO: Run as non root user
#user: ${NASCOMPOSE_UID?}:${NASCOMPOSE_GID?}
environment:
NASCOMPOSE_DOMAIN: ${NASCOMPOSE_DOMAIN?}
CF_DNS_API_TOKEN_FILE: /run/secrets/cf_dns_token
TRAEFIK_CERTIFICATESRESOLVERS_DEFAULTRESOLVER_ACME_EMAIL: admin@${NASCOMPOSE_DOMAIN?}
TRAEFIK_ENTRYPOINTS_WEBSECURE_HTTP_TLS_DOMAINS_0_MAIN: '*.${NASCOMPOSE_DOMAIN?}'
LEGO_DISABLE_CNAME_SUPPORT: true
networks:
- reverse-proxy
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ${NASCOMPOSE_SERVICES?}/reverse-proxy/volumes/traefik_acme/:/etc/traefik/acme/
- ${NASCOMPOSE_SERVICES?}/reverse-proxy/volumes/traefik_logs/:/var/log/traefik/
# Config
- ${NASCOMPOSE_SERVICES?}/reverse-proxy/configs/traefik.yml:/etc/traefik/traefik.yml:ro
- ${NASCOMPOSE_SERVICES?}/reverse-proxy/configs/dynamic:/etc/traefik/dynamic:ro
# Secrets
- ${NASCOMPOSE_SERVICES?}/reverse-proxy/secrets/cf_dns_token:/run/secrets/cf_dns_token:ro
restart: unless-stopped
- ./volumes/traefik_acme/:/etc/traefik/acme/
- ./volumes/traefik_logs/:/var/log/traefik/
- ./configs/traefik.yml:/etc/traefik/traefik.yml:ro
- ./configs/dynamic:/etc/traefik/dynamic:ro
- ./secrets/cf_dns_token:/run/secrets/cf_dns_token:ro
labels:
traefik.enable: true
traefik.http.routers.traefik.service: api@internal
traefik.http.routers.traefik.middlewares: authelia@file
traefik.http.services.traefik.loadbalancer.server.port: 8081
endlessh:
extends:
file: ../compose.base.yaml
service: exposed-service
container_name: endlessh
image: lscr.io/linuxserver/endlessh
environment:
PUID: ${NASCOMPOSE_UID?}
PGID: ${NASCOMPOSE_GID?}
labels:
traefik.tcp.routers.endlessh.entryPoints: ssh-tarpit
traefik.tcp.routers.endlessh.rule: HostSNI(`*`)
# crowdsec:
# hostname: crowdsec
# image: crowdsecurity/crowdsec

View File

@@ -1,3 +1,5 @@
# yaml-language-server: $schema=https://json.schemastore.org/traefik-v2-file-provider.json
http:
middlewares:
authelia:

View File

@@ -1,3 +1,5 @@
# yaml-language-server: $schema=https://json.schemastore.org/traefik-v2-file-provider.json
http:
middlewares:
compress:

View File

@@ -1,3 +1,5 @@
# yaml-language-server: $schema=https://json.schemastore.org/traefik-v2-file-provider.json
http:
middlewares:
hsts:

View File

@@ -1,11 +0,0 @@
http:
#TODO: Convert to inline configuration for portainer
routers:
portainer:
rule: 'Host(`portainer.{{ env `NASCOMPOSE_DOMAIN` }}`)'
service: portainer@file
services:
portainer:
loadBalancer:
servers:
- url: https://{{ env `NASCOMPOSE_MACVLAN_PORTAINER_IP` }}:9443/

View File

@@ -1,7 +1,9 @@
# yaml-language-server: $schema=https://json.schemastore.org/traefik-v2-file-provider.json
http:
routers:
synology:
rule: 'Host(`synology.{{ env `NASCOMPOSE_DOMAIN` }}`)'
rule: "Host(`synology.{{ env `NASCOMPOSE_DOMAIN` }}`)"
service: synology@file
services:
synology:

View File

@@ -1,3 +1,5 @@
# yaml-language-server: $schema=https://json.schemastore.org/traefik-v2.json
providers:
docker:
exposedByDefault: false
@@ -44,7 +46,7 @@ entryPoints:
to: websecure
scheme: https
permanent: true
websecure:
websecure:
address: :8443
asDefault: true
http:
@@ -59,6 +61,10 @@ entryPoints:
address: :8022
ssh-tarpit:
address: :8222
transport:
respondingTimeouts:
readTimeout: 0
idleTimeout: 0
metrics:
address: :9982
traefik:

View File

View File

@@ -0,0 +1 @@
../../monitoring/volumes/promtail_logs/traefik