-
Notifications
You must be signed in to change notification settings - Fork 52
/
Copy pathdocker-compose.ssl.yml
33 lines (32 loc) · 1.1 KB
/
docker-compose.ssl.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
version: '3'
services:
hq:
environment:
ASPNETCORE_URLS: http://+:80
HQ_Headquarters__BaseUrl: https://${HQ_HOST}
labels:
- "traefik.enable=true"
- "traefik.http.routers.hq.rule=Host(`${HQ_HOST}`)"
- "traefik.http.routers.hq.entrypoints=websecure"
- "traefik.http.routers.hq.tls.certresolver=le"
- "traefik.http.services.hq.loadbalancer.passhostheader=true"
traefik:
image: "traefik:v2.3"
command:
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
- "--entrypoints.websecure.address=:443"
- "--entrypoints.web.http.redirections.entrypoint.to=websecure"
- "--certificatesresolvers.le.acme.tlschallenge=true"
- "--certificatesresolvers.le.acme.email=${LETS_ENCRYPT_EMAIL}"
- "--certificatesresolvers.le.acme.storage=/letsencrypt/acme.json"
volumes:
- "letsencrypt:/letsencrypt"
- "/var/run/docker.sock:/var/run/docker.sock:ro"
restart: always
ports:
- "443:443"
- "80:80"
volumes:
letsencrypt: