-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.prod.yml
69 lines (66 loc) · 1.49 KB
/
docker-compose.prod.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
version: "3.9"
services:
frontend:
image: stran-frontend
container_name: frontend
env_file:
- ./.env.docker
build:
context: ./client
# check the args
args:
- NODE_ENV=production
target: client
ports:
- "$CLIENT_PORT:$CLIENT_PORT"
depends_on:
- backend
# deploy:
# resources:
# limits:
# cpus: "0.3"
# memory: 50M
backend:
image: stran-backend
container_name: backend
env_file:
- ./.env.docker
# perform restart: always (not sure why this field was not suggested in intellisense)
# do healthcheck too in prod mode.. It is like a heartbeat signal sending every specified time interval
build:
context: ./server
args:
- NODE_ENV=production
target: server
depends_on:
- redis-server
- blockchain
ports:
- "$SERVER_PORT:$SERVER_PORT"
# deploy:
# resources:
# limits:
# cpus: "0.3"
# memory: 50M
redis-server:
container_name: redis-server
image: redis:4.0.6-alpine
ports:
- "$REDIS_PORT:$REDIS_PORT"
blockchain:
image: stran-blockchain
container_name: blockchain
env_file:
- ./.env.docker
build:
context: ./blockchain
args:
- NODE_ENV=production
target: blockchain
ports:
- "$BLOCKCHAIN_PORT:$BLOCKCHAIN_PORT"
# deploy:
# resources:
# limits:
# cpus: "0.3"
# memory: 50M