Skip to content

Commit

Permalink
add https via traefik acme and upgrade traefik 1.7.3
Browse files Browse the repository at this point in the history
  • Loading branch information
justb4 committed Oct 17, 2018
1 parent 04050de commit 2a29c28
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 29 deletions.
50 changes: 22 additions & 28 deletions services/traefik/config/traefik.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,19 @@
# Initial from:
# https://github.com/containerize-my-server/reverse-proxy/blob/master/traefik.toml
# defaultEntryPoints = ["http", "https"]
defaultEntryPoints = ["http"]
defaultEntryPoints = ["http", "https"]


# Entrypoints, http and https
[entryPoints]

# http should be redirected to https
[entryPoints.http]
address = ":80"
# [entryPoints.http.redirect]
# regex = "(http:\\/\\/[^\\/]+\\/([^\\?]+)[^\\/])$"
# replacement = "$1/"
#[entryPoints.http.redirect]
#entryPoint = "https"
[entryPoints.http.redirect]
entryPoint = "https"

# https is the default
#[entryPoints.https]
#address = ":443"
[entryPoints.https]
address = ":443"
[entryPoints.https.tls]

#[entryPoints.https.tls]
[entryPoints.monitor]
address=":8080"
[entryPoints.monitor.auth]
Expand All @@ -37,18 +30,19 @@ defaultEntryPoints = ["http"]
# Status page
entrypoint="monitor"

# Enable ACME (Let's Encrypt): automatic SSL
#[acme]
## caServer = "https://acme-staging.api.letsencrypt.org/directory"
#email = "letsencrypt@example.com"
#storage = "acme.json" # or "traefik/acme/account" if using KV store
#entryPoint = "https"
#onDemand = false
#OnHostRule = true
#
#
#[docker]
#endpoint = "unix:///var/run/docker.sock"
#domain = "example.com"
#watch = true
#exposedbydefault = false
[acme]
email = "just@justobjects.nl"
storage = "/acme.json"
entryPoint = "https"
onHostRule = true
onDemand = false

[acme.tlsChallenge] #enables the TLS ALPN Challenge

[retry]

[docker]
endpoint = "unix:///var/run/docker.sock"
domain = "test.smartemission.nl"
watch = true
exposedbydefault = false
4 changes: 3 additions & 1 deletion services/traefik/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: '3.1'

services:
proxy:
image: traefik:1.5.4-alpine
image: traefik:1.7.3-alpine

container_name: traefik

Expand All @@ -14,6 +14,7 @@ services:

ports:
- "80:80"
- "443:443"
- "8080:8080"

labels:
Expand All @@ -22,6 +23,7 @@ services:
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./config/traefik.toml:/traefik.toml
- ./config/acme.json:/acme.json

networks:
se_front:
Expand Down

0 comments on commit 2a29c28

Please sign in to comment.