Change folder layout

This commit is contained in:
Colin Hebert
2023-01-04 16:16:46 +01:00
parent 2aa1f52113
commit aaca8c3efa
36 changed files with 50 additions and 78 deletions

View File

@@ -0,0 +1,9 @@
http:
middlewares:
hsts:
headers:
frameDeny: true
browserXssFilter: true
stsSeconds: 31536000 # 1 year
stsPreload: true
stsIncludeSubdomains: true

View File

@@ -0,0 +1,6 @@
tls:
stores:
default:
defaultCertificate:
certFile: /run/secrets/traefik_tls_cert
keyFile: /run/secrets/traefik_tls_key

View File

@@ -0,0 +1,11 @@
http:
routers:
traefik:
rule: Host(`traefik.{{ env `NASCOMPOSE_TRAEFIK_DOMAIN` }}`)
service: api@internal
middlewares:
- traefik-auth
middlewares:
traefik-auth:
basicAuth:
usersFile: /run/secrets/traefik_password

View File

@@ -0,0 +1,32 @@
providers:
docker:
endpoint: tcp://docker:2375
exposedByDefault: false
network: traefik
defaultRule: Host(`{{ index .Labels "com.docker.compose.service" }}.{{ env `NASCOMPOSE_TRAEFIK_DOMAIN` }}`)
file:
directory: /etc/traefik/dynamic/
serverstransport:
insecureskipverify: true
api: {}
accessLog: {}
entryPoints:
web:
address: :80
http:
redirections:
entryPoint:
to: websecure
scheme: https
websecure:
address: :443
http:
tls: {}
middlewares:
- hsts@file
global:
sendAnonymousUsage: false

View File

@@ -0,0 +1,9 @@
#!/bin/sh
# Workaround for https://github.com/haugene/docker-transmission-openvpn/pull/2480
if [[ -f /run/secrets/rpc_creds ]]; then
export TRANSMISSION_RPC_USERNAME=$(head -1 /run/secrets/rpc_creds)
export TRANSMISSION_RPC_PASSWORD=$(tail -1 /run/secrets/rpc_creds)
fi
echo "${TRANSMISSION_RPC_USERNAME}" > /config/transmission-credentials.txt
echo "${TRANSMISSION_RPC_PASSWORD}" >> /config/transmission-credentials.txt