diff --git a/services/traefik/config/default.nusa.toml b/services/traefik/config/default.nusa.toml deleted file mode 100644 index 5bac1e0..0000000 --- a/services/traefik/config/default.nusa.toml +++ /dev/null @@ -1,18 +0,0 @@ -# defaultEntryPoints must be at the top because it should not be in any table below -# Initial from: -# https://github.com/containerize-my-server/reverse-proxy/blob/master/traefik.toml -defaultEntryPoints = ["http"] - -[entryPoints] - [entryPoints.http] - address = ":80" - -[retry] - -[docker] -endpoint = "unix:///var/run/docker.sock" -watch = true -exposedbydefault = false - -[accessLog] - filePath = "/var/log/traefik/access.log" diff --git a/services/traefik/config/default.nusa.yaml b/services/traefik/config/default.nusa.yaml new file mode 100644 index 0000000..1381b8e --- /dev/null +++ b/services/traefik/config/default.nusa.yaml @@ -0,0 +1,16 @@ +entryPoints: + web: + address: ":80" + +retry: + attempts: 4 + initialInterval: 5s + +providers: + docker: + endpoint: "unix:///var/run/docker.sock" + watch: true + exposedbydefault = false + +accessLog: + filePath: /var/log/traefik/access.log diff --git a/services/traefik/config/traefik.PYGEOAPI.toml b/services/traefik/config/traefik.PYGEOAPI.toml deleted file mode 100644 index 318c2a8..0000000 --- a/services/traefik/config/traefik.PYGEOAPI.toml +++ /dev/null @@ -1,41 +0,0 @@ -# defaultEntryPoints must be at the top because it should not be in any table below -# Initial from: -# https://github.com/containerize-my-server/reverse-proxy/blob/master/traefik.toml -defaultEntryPoints = ["http", "https"] - - -# Entrypoints, http and https -[entryPoints] - -# http should be redirected to https - [entryPoints.http] - address = ":80" - [entryPoints.http.redirect] - entryPoint = "https" - - [entryPoints.https] - address = ":443" - [entryPoints.https.tls] - -[acme] -email = "just@justobjects.nl" -storage = "/acme.json" -entryPoint = "https" -onHostRule = false -onDemand = false - -[acme.tlsChallenge] #enables the TLS ALPN Challenge - -[[acme.domains]] - main = "demo.pygeoapi.io" - -[retry] - -[docker] -endpoint = "unix:///var/run/docker.sock" -domain = "pygeoapi.io" -watch = true -exposedbydefault = false - -[accessLog] - filePath = "/var/log/traefik/access.log" diff --git a/services/traefik/config/traefik.PYGEOAPI.yaml b/services/traefik/config/traefik.PYGEOAPI.yaml new file mode 100644 index 0000000..b54ba27 --- /dev/null +++ b/services/traefik/config/traefik.PYGEOAPI.yaml @@ -0,0 +1,34 @@ +entryPoints: + web: + address: ":80" + http: + redirections: + entryPoint: + to: websesecure + scheme: https + + websecure: + address: ":443" + tls: {} + +retry: + attempts: 4 + initialInterval: 5s + +providers: + docker: + endpoint: "unix:///var/run/docker.sock" + watch: true + domain: pygeoapi.io + exposedbydefault = false + +accessLog: + filePath: /var/log/traefik/access.log + +certificateResolvers: + default: + acme: + domain: demo.pygeoapi.io + email: just@justobjects.nl + storage: /acme.json + tlsChallenge: {} diff --git a/services/traefik/config/traefik.default.toml b/services/traefik/config/traefik.default.toml deleted file mode 100644 index 5bac1e0..0000000 --- a/services/traefik/config/traefik.default.toml +++ /dev/null @@ -1,18 +0,0 @@ -# defaultEntryPoints must be at the top because it should not be in any table below -# Initial from: -# https://github.com/containerize-my-server/reverse-proxy/blob/master/traefik.toml -defaultEntryPoints = ["http"] - -[entryPoints] - [entryPoints.http] - address = ":80" - -[retry] - -[docker] -endpoint = "unix:///var/run/docker.sock" -watch = true -exposedbydefault = false - -[accessLog] - filePath = "/var/log/traefik/access.log" diff --git a/services/traefik/config/traefik.default.yaml b/services/traefik/config/traefik.default.yaml new file mode 100644 index 0000000..1381b8e --- /dev/null +++ b/services/traefik/config/traefik.default.yaml @@ -0,0 +1,16 @@ +entryPoints: + web: + address: ":80" + +retry: + attempts: 4 + initialInterval: 5s + +providers: + docker: + endpoint: "unix:///var/run/docker.sock" + watch: true + exposedbydefault = false + +accessLog: + filePath: /var/log/traefik/access.log diff --git a/services/traefik/docker-compose.yml b/services/traefik/docker-compose.yml index 0d3fc97..50686c5 100644 --- a/services/traefik/docker-compose.yml +++ b/services/traefik/docker-compose.yml @@ -2,7 +2,7 @@ version: '3.1' services: proxy: - image: traefik:1.7.10-alpine + image: traefik:v3.3.2 container_name: traefik @@ -20,7 +20,7 @@ services: volumes: - /var/run/docker.sock:/var/run/docker.sock - - ./config/traefik.${HOSTNAME}.toml:/traefik.toml + - ./config/traefik.${HOSTNAME}.yaml:/traefik.yaml - ./config/acme.json:/acme.json - traefik_logs:/var/log/traefik