traefik specific labels and files
This commit is contained in:
3
Generated/.gitignore
vendored
3
Generated/.gitignore
vendored
@@ -1,2 +1,3 @@
|
|||||||
*.yml
|
*.yml
|
||||||
*.tmpl
|
*.tmpl
|
||||||
|
*.toml
|
||||||
35
Production/traefilk.toml
Normal file
35
Production/traefilk.toml
Normal 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"
|
||||||
@@ -21,3 +21,7 @@ docker run -v "$(Get-Location)\Generated:/app/Generated" `
|
|||||||
If ($BTCPAYGEN_REVERSEPROXY -eq "nginx") {
|
If ($BTCPAYGEN_REVERSEPROXY -eq "nginx") {
|
||||||
Copy-Item ".\Production\nginx.tmpl" -Destination ".\Generated"
|
Copy-Item ".\Production\nginx.tmpl" -Destination ".\Generated"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
If ($BTCPAYGEN_REVERSEPROXY -eq "traefik") {
|
||||||
|
Copy-Item ".\Production\traefik.toml" -Destination ".\Generated"
|
||||||
|
}
|
||||||
|
|||||||
8
build.sh
8
build.sh
@@ -22,3 +22,11 @@ docker run -v "$(pwd)/Generated:/app/Generated" \
|
|||||||
if [ "$BTCPAYGEN_REVERSEPROXY" == "nginx" ]; then
|
if [ "$BTCPAYGEN_REVERSEPROXY" == "nginx" ]; then
|
||||||
cp Production/nginx.tmpl Generated/nginx.tmpl
|
cp Production/nginx.tmpl Generated/nginx.tmpl
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$BTCPAYGEN_REVERSEPROXY" == "traefik" ]; then
|
||||||
|
cp Production/traefik.toml Generated/traefik.toml
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -8,3 +8,5 @@ services:
|
|||||||
- "traefik.enable=true"
|
- "traefik.enable=true"
|
||||||
- "traefik.frontend.rule=Host:${BTCPAY_HOST}"
|
- "traefik.frontend.rule=Host:${BTCPAY_HOST}"
|
||||||
- "traefik.port.rule=49392"
|
- "traefik.port.rule=49392"
|
||||||
|
- "traefik.acme.domains=${BTCPAY_HOST},www.${BTCPAY_HOST}"
|
||||||
|
- "traefik.acme.email=${LETSENCRYPT_EMAIL}"
|
||||||
|
|||||||
@@ -9,11 +9,12 @@ services:
|
|||||||
- "80:80"
|
- "80:80"
|
||||||
- "443:443"
|
- "443:443"
|
||||||
volumes:
|
volumes:
|
||||||
- "/var/run/docker.sock:/var/run/docker.sock"
|
- "/var/run/docker.sock:/var/run/docker.sock"
|
||||||
- "./traefik.toml:/traefik.toml"
|
- "./traefik.toml:/traefik.toml"
|
||||||
- "./acme.json:/acme.json"
|
- "./acme.json:/acme.json"
|
||||||
- "./servers.toml:/servers.toml"
|
- "./servers.toml:/servers.toml"
|
||||||
- "./traefik_logs:/traefik_logs"
|
- "./traefik_logs:/traefik_logs"
|
||||||
|
|
||||||
links:
|
links:
|
||||||
- btcpayserver
|
- btcpayserver
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user