Browse Source

traefik specific labels and files

feature/auto_ssh
Andrew Camilleri 7 years ago
parent
commit
34e263d12b
  1. 3
      Generated/.gitignore
  2. 35
      Production/traefilk.toml
  3. 4
      build.ps1
  4. 8
      build.sh
  5. 2
      docker-compose-generator/docker-fragments/traefik-labels.yml
  6. 11
      docker-compose-generator/docker-fragments/traefik.yml

3
Generated/.gitignore

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

35
Production/traefilk.toml

@ -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"

4
build.ps1

@ -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"
}

8
build.sh

@ -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

2
docker-compose-generator/docker-fragments/traefik-labels.yml

@ -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}"

11
docker-compose-generator/docker-fragments/traefik.yml

@ -9,11 +9,12 @@ services:
- "80:80"
- "443:443"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
- "./traefik.toml:/traefik.toml"
- "./acme.json:/acme.json"
- "./servers.toml:/servers.toml"
- "./traefik_logs:/traefik_logs"
- "/var/run/docker.sock:/var/run/docker.sock"
- "./traefik.toml:/traefik.toml"
- "./acme.json:/acme.json"
- "./servers.toml:/servers.toml"
- "./traefik_logs:/traefik_logs"
links:
- btcpayserver

Loading…
Cancel
Save