enable ssl
This commit is contained in:
parent
2ac07677f6
commit
b7f062684a
23
traefik.yml
23
traefik.yml
@ -10,6 +10,9 @@ services:
|
|||||||
- 80:80
|
- 80:80
|
||||||
# Listen on port 443, default for HTTPS
|
# Listen on port 443, default for HTTPS
|
||||||
- 443:443
|
- 443:443
|
||||||
|
environment:
|
||||||
|
- "AWS_ACCESS_KEY_ID=AKIATUPHA7LDOZY3RRG3"
|
||||||
|
- "AWS_SECRET_ACCESS_KEY=HM1RLYsLcxSJUAmuadUN96YV6im89Ev0oqFlLvCw"
|
||||||
deploy:
|
deploy:
|
||||||
placement:
|
placement:
|
||||||
constraints:
|
constraints:
|
||||||
@ -30,22 +33,22 @@ services:
|
|||||||
- traefik.http.middlewares.admin-auth.basicauth.users=${USERNAME?Variable not set}:${HASHED_PASSWORD?Variable not set}
|
- traefik.http.middlewares.admin-auth.basicauth.users=${USERNAME?Variable not set}:${HASHED_PASSWORD?Variable not set}
|
||||||
# https-redirect middleware to redirect HTTP to HTTPS
|
# https-redirect middleware to redirect HTTP to HTTPS
|
||||||
# It can be re-used by other stacks in other Docker Compose files
|
# It can be re-used by other stacks in other Docker Compose files
|
||||||
# - traefik.http.middlewares.https-redirect.redirectscheme.scheme=https
|
- traefik.http.middlewares.https-redirect.redirectscheme.scheme=https
|
||||||
# - traefik.http.middlewares.https-redirect.redirectscheme.permanent=true
|
- traefik.http.middlewares.https-redirect.redirectscheme.permanent=true
|
||||||
# traefik-http set up only to use the middleware to redirect to https
|
# traefik-http set up only to use the middleware to redirect to https
|
||||||
# Uses the environment variable DOMAIN
|
# Uses the environment variable DOMAIN
|
||||||
- traefik.http.routers.traefik-public-http.rule=Host(`${DOMAIN?Variable not set}`)
|
- traefik.http.routers.traefik-public-http.rule=Host(`${DOMAIN?Variable not set}`)
|
||||||
- traefik.http.routers.traefik-public-http.entrypoints=http
|
- traefik.http.routers.traefik-public-http.entrypoints=http
|
||||||
# - traefik.http.routers.traefik-public-http.middlewares=https-redirect
|
- traefik.http.routers.traefik-public-http.middlewares=https-redirect
|
||||||
# traefik-https the actual router using HTTPS
|
# traefik-https the actual router using HTTPS
|
||||||
# Uses the environment variable DOMAIN
|
# Uses the environment variable DOMAIN
|
||||||
# - traefik.http.routers.traefik-public-https.rule=Host(`${DOMAIN?Variable not set}`)
|
- traefik.http.routers.traefik-public-https.rule=Host(`${DOMAIN?Variable not set}`)
|
||||||
# - traefik.http.routers.traefik-public-https.entrypoints=https
|
- traefik.http.routers.traefik-public-https.entrypoints=https
|
||||||
# - traefik.http.routers.traefik-public-https.tls=true
|
- traefik.http.routers.traefik-public-https.tls=true
|
||||||
# Use the special Traefik service api@internal with the web UI/Dashboard
|
# Use the special Traefik service api@internal with the web UI/Dashboard
|
||||||
- traefik.http.routers.traefik-public-http.service=api@internal
|
- traefik.http.routers.traefik-public-http.service=api@internal
|
||||||
# Use the "le" (Let's Encrypt) resolver created below
|
# Use the "le" (Let's Encrypt) resolver created below
|
||||||
# - traefik.http.routers.traefik-public-https.tls.certresolver=le
|
- traefik.http.routers.traefik-public-https.tls.certresolver=le
|
||||||
# Enable HTTP Basic auth, using the middleware created above
|
# Enable HTTP Basic auth, using the middleware created above
|
||||||
- traefik.http.routers.traefik-public-http.middlewares=admin-auth
|
- traefik.http.routers.traefik-public-http.middlewares=admin-auth
|
||||||
# Define the port inside of the Docker service to use
|
# Define the port inside of the Docker service to use
|
||||||
@ -69,11 +72,13 @@ services:
|
|||||||
# Create an entrypoint "https" listening on port 443
|
# Create an entrypoint "https" listening on port 443
|
||||||
- --entrypoints.https.address=:443
|
- --entrypoints.https.address=:443
|
||||||
# Create the certificate resolver "le" for Let's Encrypt, uses the environment variable EMAIL
|
# Create the certificate resolver "le" for Let's Encrypt, uses the environment variable EMAIL
|
||||||
# - --certificatesresolvers.le.acme.email=${EMAIL?Variable not set}
|
- --certificatesresolvers.le.acme.email=${EMAIL?Variable not set}
|
||||||
# Store the Let's Encrypt certificates in the mounted volume
|
# Store the Let's Encrypt certificates in the mounted volume
|
||||||
# - --certificatesresolvers.le.acme.storage=/certificates/acme.json
|
- --certificatesresolvers.le.acme.storage=/certificates/acme.json
|
||||||
# Use the TLS Challenge for Let's Encrypt
|
# Use the TLS Challenge for Let's Encrypt
|
||||||
# - --certificatesresolvers.le.acme.tlschallenge=true
|
# - --certificatesresolvers.le.acme.tlschallenge=true
|
||||||
|
- --certificatesresolvers.le.acme.dnschallenge=true
|
||||||
|
- --certificatesresolvers.le.acme.dnschallenge.provider=route53
|
||||||
# Enable the access log, with HTTP requests
|
# Enable the access log, with HTTP requests
|
||||||
- --accesslog
|
- --accesslog
|
||||||
# Enable the Traefik log, for configurations and errors
|
# Enable the Traefik log, for configurations and errors
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user