1
0

traefik specific labels and files

This commit is contained in:
Andrew Camilleri
2018-09-13 13:35:20 +02:00
parent 16cd65c37f
commit 34e263d12b
6 changed files with 57 additions and 6 deletions

View File

@@ -1,2 +1,3 @@
*.yml
*.tmpl
*.toml

35
Production/traefilk.toml Normal file
View File

@@ -0,0 +1,35 @@
defaultEntryPoints = ["https","http"]
logLevel="ERROR"
[entryPoints]
useXForwardedFor = true
[entryPoints.http]
address = ":80"
[entryPoints.http.redirect]
entryPoint = "https"
[entryPoints.https]
address = ":443"
[entryPoints.https.tls]
[retry]
[docker]
endpoint = "unix:///var/run/docker.sock"
watch = true
exposedByDefault = false
[acme]
storage = "acme.json"
entryPoint = "https"
onHostRule = true
[acme.httpChallenge]
entryPoint = "http"
[traefikLog]
filePath = "/traefik_logs/traefik.log"
format = "json"
[accessLog]
filePath = "/traefik_logs/access.log"
format = "json"

View File

@@ -21,3 +21,7 @@ docker run -v "$(Get-Location)\Generated:/app/Generated" `
If ($BTCPAYGEN_REVERSEPROXY -eq "nginx") {
Copy-Item ".\Production\nginx.tmpl" -Destination ".\Generated"
}
If ($BTCPAYGEN_REVERSEPROXY -eq "traefik") {
Copy-Item ".\Production\traefik.toml" -Destination ".\Generated"
}

View File

@@ -22,3 +22,11 @@ docker run -v "$(pwd)/Generated:/app/Generated" \
if [ "$BTCPAYGEN_REVERSEPROXY" == "nginx" ]; then
cp Production/nginx.tmpl Generated/nginx.tmpl
fi
if [ "$BTCPAYGEN_REVERSEPROXY" == "traefik" ]; then
cp Production/traefik.toml Generated/traefik.toml
fi

View File

@@ -8,3 +8,5 @@ services:
- "traefik.enable=true"
- "traefik.frontend.rule=Host:${BTCPAY_HOST}"
- "traefik.port.rule=49392"
- "traefik.acme.domains=${BTCPAY_HOST},www.${BTCPAY_HOST}"
- "traefik.acme.email=${LETSENCRYPT_EMAIL}"

View File

@@ -14,6 +14,7 @@ services:
- "./acme.json:/acme.json"
- "./servers.toml:/servers.toml"
- "./traefik_logs:/traefik_logs"
links:
- btcpayserver