-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
41 lines (37 loc) · 1.05 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.7'
services:
traefik:
image: traefik:v2.1
command:
- --api.debug=true
- --log.level=ERROR
- --entrypoints.web.address=:80
- --providers.docker
- --api.insecure
ports:
- "80:80"
- "8080:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
client:
build:
dockerfile: Dockerfile
context: ./client
volumes:
- /app/node_modules
- ./client:/app
labels:
- "traefik.http.routers.client.rule=Host(`client.localhost`)"
backend:
build:
dockerfile: Dockerfile
context: ./backend
volumes:
- /app/node_modules
- ./backend:/app
labels:
- "traefik.http.routers.backend.rule=Host(`client.localhost`) && PathPrefix(`/api/`)"
- "traefik.http.routers.backend.middlewares=stripapiprefix,test-compress"
- "traefik.http.middlewares.stripapiprefix.stripprefix.prefixes=/api"
- "traefik.http.middlewares.test-compress.compress=true"
- "traefik.http.services.backend.loadbalancer.server.port=5000"