-
-
Notifications
You must be signed in to change notification settings - Fork 15
/
docker-compose.yml
57 lines (53 loc) · 2.22 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
version: '3'
services:
frontend:
build: "./frontend"
ports:
- "5000:5000"
labels:
- "traefik.enable=true"
- "traefik.http.routers.front.entrypoints=https"
- "traefik.http.routers.front.rule=Host(`commondata.ru`)"
- "traefik.http.routers.front.tls=true"
- "traefik.http.routers.front.tls.certresolver=letsEncrypt"
- "traefik.http.middlewares.redirect-to-https.redirectScheme.scheme=https"
backend:
build: "./backend"
ports:
- "8000:8000"
labels:
- "traefik.enable=true"
- "traefik.http.routers.backend.entrypoints=https"
- "traefik.http.routers.backend.rule=Host(`backend.commondata.ru`)"
- "traefik.http.routers.backend.tls=true"
- "traefik.http.routers.backend.tls.certresolver=letsEncrypt"
- "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
traefik:
image: traefik:v2.2
restart: unless-stopped
security_opt:
- no-new-privileges:true
ports:
- 80:80
- 443:443
volumes:
- /etc/localtime:/etc/localtime:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./data/traefik.yml:/traefik.yml:ro
- ./data/acme.json:/acme.json
labels:
- "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
- "traefik.enable=true"
- "traefik.http.routers.traefik.entrypoints=https"
- "traefik.http.routers.traefik.rule=Host(`traefik.commondata.ru`)"
- "traefik.http.routers.traefik.tls=true"
- "traefik.http.routers.traefik.tls.certresolver=letsEncrypt"
- "traefik.http.routers.traefik.service=api@internal"
- "traefik.http.services.traefik-traefik.loadbalancer.server.port=8001"
- "traefik.http.middlewares.traefik-auth.basicauth.users=admin:$$apr1$$OHsymSWA$$FcWFxYK.9iH8Ny/FlJ8pv1"
- "traefik.http.routers.traefik.middlewares=traefik-auth"
- "traefik.http.middlewares.https_redirect.redirectscheme.scheme=https"
- "traefik.http.middlewares.https_redirect.redirectscheme.permanent=true"
- "traefik.http.routers.http_catchall.rule=HostRegexp(`{any:.+}`)"
- "traefik.http.routers.http_catchall.entrypoints=http"
- "traefik.http.routers.http_catchall.middlewares=https_redirect"