-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
72 lines (69 loc) · 1.5 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
networks:
webapp:
name: webapp
services:
server:
build:
context: .
dockerfile: server/Dockerfile
container_name: server
volumes:
- ./server:/app/server
- ./tsconfig.json:/app/tsconfig.json
- ./package.json:/app/package.json
- ./yarn.lock:/app/yarn.lock
- ./.yarnrc.yml:/app/.yarnrc.yml
- ./.yarn:/app/.yarn
command:
- yarn
- --cwd
- /app/server
- dev
environment:
- NODE_ENV=development
networks:
- webapp
healthcheck:
test:
[
'CMD-SHELL',
'wget -q --spider http://server:3000/api/health || exit 1',
]
interval: 7s
timeout: 10s
retries: 5
restart: unless-stopped
client:
build:
context: .
dockerfile: client/Dockerfile
container_name: client
volumes:
- ./client:/app/client
- ./package.json:/app/package.json
- ./yarn.lock:/app/yarn.lock
- ./.yarnrc.yml:/app/.yarnrc.yml
- ./.yarn:/app/.yarn
environment:
- NODE_ENV=development
- CHOKIDAR_USEPOLLING=true
- WATCHPACK_POLLING=true
networks:
- webapp
restart: unless-stopped
nginx:
build:
context: .
dockerfile: nginx/Dockerfile
container_name: nginx
volumes:
- ./nginx/conf.d:/etc/nginx/conf.d:ro
- ./client/dist/:/usr/share/nginx/html
ports:
- '80:80'
depends_on:
- server
- client
networks:
- webapp
restart: unless-stopped