forked from eth-educators/eth-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
traefik-aws.yml
41 lines (41 loc) · 1.6 KB
/
traefik-aws.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
version: "3.4"
services:
traefik:
image: traefik-aws
build:
context: ./traefik
restart: ${RESTART}
command:
# - --log.level=DEBUG
# - --certificatesResolvers.letsencrypt.acme.caServer=https://acme-staging-v02.api.letsencrypt.org/directory
- --providers.docker=true
- --providers.docker.exposedbydefault=false
- --certificatesresolvers.letsencrypt.acme.dnschallenge=true
- --certificatesresolvers.letsencrypt.acme.dnschallenge.provider=route53
- --certificatesresolvers.letsencrypt.acme.email=${ACME_EMAIL}
- --certificatesresolvers.letsencrypt.acme.storage=/letsencrypt/acme.json
- --entrypoints.web.address=:${TRAEFIK_WEB_HTTP_PORT}
- --entrypoints.web.http.redirections.entrypoint.to=websecure
- --entrypoints.web.http.redirections.entrypoint.scheme=https
- --entrypoints.websecure.address=:${TRAEFIK_WEB_PORT}
- --entrypoints.websecure.http.tls=true
- --entrypoints.websecure.http.tls.certResolver=letsencrypt
- --entrypoints.websecure.http.tls.domains[0].main=${DOMAIN}
- --entrypoints.websecure.http.tls.domains[0].sans=*.${DOMAIN}
ports:
- ${TRAEFIK_WEB_PORT}:${TRAEFIK_WEB_PORT}/tcp
- ${TRAEFIK_WEB_HTTP_PORT}:${TRAEFIK_WEB_HTTP_PORT}/tcp
environment:
- AWS_PROFILE=${AWS_PROFILE}
- AWS_HOSTED_ZONE_ID=${AWS_HOSTED_ZONE_ID}
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- certs:/letsencrypt
- ~/.aws:/root/.aws:ro
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
eth:
depends_on:
- traefik
volumes:
certs: