-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
53 lines (51 loc) · 1.36 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
version: "3"
services:
traefik:
image: traefik:v2.9.4
command: "--entrypoints.web.address=0.0.0.0:80
--providers.docker
--providers.docker.exposedByDefault=false
--providers.docker.network=pycon-fastapi-workshop_traefik
'--providers.docker.constraints=Label(`pycon.traefik`,`true`)'"
ports:
- 8081:80
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
networks:
- traefik
backend:
environment:
PROXY_ROOT_PATH: /api
CHAT_BACKEND: memory
AUTH_BACKEND: memory
build:
context: pycon-chat
image: pycon_chat
networks:
- traefik
- redis
volumes:
- ./pycon-chat/pycon_chat:/app/pycon_chat
labels:
- 'traefik.http.routers.pycon-chat-backend.rule=PathPrefix(`/api/`)'
- 'traefik.http.middlewares.pycon-chat-backend-strip-prefix.stripprefix.prefixes=/api'
- 'traefik.http.routers.pycon-chat-backend.middlewares=pycon-chat-backend-strip-prefix'
- 'traefik.enable=true'
- 'pycon.traefik=true'
frontend:
build:
context: frontend
image: pycon-chat-frontend
networks:
- traefik
labels:
- 'traefik.http.routers.pycon-chat-frontend.rule=PathPrefix(`/`)'
- 'traefik.enable=true'
- 'pycon.traefik=true'
redis:
image: redis:7.0.5
networks:
- redis
networks:
traefik:
redis: