-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.dev.yaml
59 lines (56 loc) · 1.54 KB
/
docker-compose.dev.yaml
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
58
59
version: "3"
services:
api:
image: node:16
working_dir: /usr/src/app/
environment:
- REDIS_HOST=redis_cache
- REDIS_PORT=6379
- REDIS_PASSWORD=r3d1sc4ch3
volumes:
- ./packages/server:/usr/src/app/
- ./config:/usr/config
- ./data/logs/api/:/usr/src/app/logs/
command: /bin/sh -c 'chmod +x /usr/src/app/dev-start.sh && /usr/src/app/dev-start.sh'
ports:
- '3001:3001'
depends_on:
- redis_cache
labels:
- traefik.http.routers.api.rule=Host(`localhost`) && PathPrefix(`/api`)
- traefik.http.routers.api.entrypoints=web
frontend:
image: node:16
working_dir: /usr/src/app/
volumes:
- ./packages/client:/usr/src/app/
command: /bin/sh -c 'chmod +x /usr/src/app/dev-start.sh && /usr/src/app/dev-start.sh'
ports:
- '8080:8080'
labels:
- traefik.http.routers.frontend.rule=Host(`localhost`) && PathPrefix(`/`)
- traefik.http.routers.frontend.entrypoints=web
traefik:
image: traefik:v2.9
command:
- --entrypoints.web.address=:80
- --providers.docker=true
- --log.level=DEBUG
- --log.filePath=/logs/traefik.log
ports:
- "80:80"
depends_on:
- api
- frontend
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./data/logs/traefik/:/logs/
redis_cache:
image: redis:alpine3.15
command: redis-server --requirepass r3d1sc4ch3
environment:
- REDIS_REPLICATION_MODE=master
volumes:
- ./data/redis:/var/lib/redis
ports:
- "6379:6379"