-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
41 lines (39 loc) · 1.46 KB
/
docker-compose.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.3"
services:
whoami:
image: containous/whoami
container_name: whoami
restart: unless-stopped
network_mode: "bridge"
labels:
- "traefik.http.routers.whoami.rule=Host(`whoami.joaogabriel.org`)"
- "traefik.http.routers.whoami.tls=true"
- "traefik.http.routers.whoami.tls.certresolver=myresolver"
traefik:
image: traefik:v2.2.1
container_name: traefik
restart: unless-stopped
network_mode: "bridge"
command:
- "--api.debug=true"
- "--api.insecure=false"
- "--api.dashboard=true"
- "--providers.docker=true"
- "--entrypoints.web.address=:80"
- "--entrypoints.websecure.address=:443"
- "--certificatesresolvers.myresolver.acme.email=gabriel@joaogabriel.org"
- "--certificatesresolvers.myresolver.acme.storage=acme.json"
- "--certificatesresolvers.myresolver.acme.httpchallenge.entrypoint=web"
labels:
- "traefik.http.routers.api.rule=Host(`traefik.joaogabriel.org`)"
- "traefik.http.routers.api.service=api@internal"
- "traefik.http.routers.api.middlewares=auth"
- "traefik.http.middlewares.auth.basicauth.users=test:$$apr1$$H6uskkkW$$IgXLP6ewTrSuBkTrqE8wj/,test2:$$apr1$$d9hr9HBB$$4HxwgUir3HP4EsggP/QNo0"
- "traefik.http.routers.api.tls=true"
- "traefik.http.routers.api.tls.certresolver=myresolver"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./acme.json:/acme.json
ports:
- 80:80
- 443:443