-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
51 lines (47 loc) · 1.52 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
version: "3.9"
services:
# memcached:
# image: memcached:latest
# ports:
# - "11211:11211"
frontend:
build: ${FRONTEND_DIR}
ports:
- 3000:3000
labels:
- "traefik.enable=true"
- "traefik.http.routers.front.entryPoints=https"
- "traefik.http.routers.front.rule=Host(`${DOMAIN}`)"
- "traefik.http.routers.front.tls.certResolver=letsEncrypt"
backend:
build: ${BACKEND_DIR}
environment:
- DOMAIN=b.${DOMAIN}
ports:
- 8000:8000
labels:
- "traefik.enable=true"
- "traefik.http.routers.backend.entryPoints=https"
- "traefik.http.routers.backend.rule=Host(`b.${DOMAIN}`)"
- "traefik.http.routers.backend.tls.certResolver=letsEncrypt"
traefik:
image: traefik:v2.4
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
- ./traefik/traefik.yml:/traefik.yml:ro
- ./traefik/acme.json:/acme.json
labels:
- "traefik.enable=true"
- "traefik.http.routers.traefik.entryPoints=https"
- "traefik.http.routers.traefik.rule=Host(`t.${DOMAIN}`)"
- "traefik.http.routers.traefik.tls.certResolver=letsEncrypt"
- "traefik.http.routers.traefik.service=api@internal"
# - "traefik.http.middlewares.traefik-auth.basicauth.users=admin:$$apr1$$OHsymSWA$$FcWFxYK.9iH8Ny/FlJ8pv1"
# - "traefik.http.routers.traefik.middlewares=traefik-auth"