Add basic traefik config

This commit is contained in:
GHOSCHT 2024-03-03 20:37:06 +01:00
parent e17fb2a821
commit 88fd84d058
Signed by: ghoscht
GPG key ID: 2C2C1C62A5388E82
4 changed files with 17 additions and 4 deletions

View file

@ -9,7 +9,7 @@ services:
- "443:443" - "443:443"
- "6666:8080" - "6666:8080"
volumes: volumes:
- traefik_data:/etc/traefik - ./traefik_data:/etc/traefik
- /var/run/docker.sock:/var/run/docker.sock:ro - /var/run/docker.sock:/var/run/docker.sock:ro
networks: networks:
traefik_net: traefik_net:
@ -72,7 +72,7 @@ services:
- TZ=UTC # optional: set desired timezone - TZ=UTC # optional: set desired timezone
user: 1000:1000 # optional: replace with your own user/group or uid/gid user: 1000:1000 # optional: replace with your own user/group or uid/gid
volumes: volumes:
- ./ntfy/server.yml:/etc/ntfy/server.yml - ./ntfy_data/server.yml:/etc/ntfy/server.yml
labels: labels:
- traefik.enable=true - traefik.enable=true
- traefik.http.routers.ntfy.entrypoints=websecure - traefik.http.routers.ntfy.entrypoints=websecure
@ -114,8 +114,6 @@ networks:
driver: bridge driver: bridge
external: true external: true
volumes: volumes:
traefik_data:
name: traefik_data
homarr_data: homarr_data:
name: homarr_data name: homarr_data
homarr_icons: homarr_icons:

View file

@ -0,0 +1,6 @@
http:
middlewares:
httpsredirect:
redirectScheme:
scheme: https
permanent: true

View file

@ -0,0 +1,9 @@
http:
routers:
redirecttohttps:
entryPoints:
- "web"
middlewares:
- "httpsredirect"
rule: "HostRegexp(`{host:.+}`)"
service: "noop@internal"