forked from hyperledger-cello/cello
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
125 lines (118 loc) · 3.38 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# This compose file will deploy the services, and bootup a mongo server.
# Copyright IBM Corp., All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
# Local `/opt/cello/mongo` will be used for the db storage.
# dashboard: dashboard service of cello, listen on 8080
# app: app service of cello, listen on 80
# nginx: front end
# mongo: mongo db
version: '2'
services:
# cello dashboard service
dashboard:
build:
context: src
dockerfile: Dockerfile-dashboard
image: hyperledger/cello-dashboard
container_name: dashboard
hostname: cello-dashboard
restart: unless-stopped
environment:
- MONGO_URL=mongodb://mongo:27017
- MONGO_DB=dev
- DEBUG=True # in debug mode, service will auto-restart
- LOG_LEVEL=DEBUG # what level log will be output
- STATIC_FOLDER=$STATIC_FOLDER
- TEMPLATE_FOLDER=$TEMPLATE_FOLDER
expose:
- "8080"
volumes: # This should be removed in product env
- ./src:/app
# cello restserver service
restserver:
build:
context: src
dockerfile: Dockerfile-restserver
image: hyperledger/cello-restserver
container_name: restserver
hostname: cello-restserver
restart: unless-stopped
environment:
- MONGO_URL=mongodb://mongo:27017
- MONGO_DB=dev
- DEBUG=True # in debug mode, service will auto-restart
- LOG_LEVEL=DEBUG # what level log will be output
expose:
- "80"
volumes: # This should be removed in product env
- ./src:/app
# cello watchdog service
watchdog:
build:
context: src
dockerfile: Dockerfile-watchdog
image: hyperledger/cello-watchdog
container_name: watchdog
hostname: cello-watchdog
restart: unless-stopped
environment:
- MONGO_URL=mongodb://mongo:27017
- MONGO_DB=dev
- DEBUG=True # in debug mode, service will auto-restart
- LOG_LEVEL=DEBUG # what level log will be output
volumes: # This should be removed in product env
- ./src:/app
# mongo database, may use others in future
mongo:
image: hyperledger/cello-mongo
hostname: mongo
container_name: mongo
restart: unless-stopped
mem_limit: 2048m
ports:
#- "27017:27017" # use follow line instead in production env
- "127.0.0.1:27017:27017"
- "127.0.0.1:27018:27018"
environment:
- NO_USED=0
volumes:
- /opt/cello/mongo:/data/db
# nginx to forward front request, may split it out in future
nginx:
image: hyperledger/cello-nginx
hostname: nginx
container_name: nginx
restart: always
mem_limit: 2048m
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.default.conf
#- /opt/cello/nginx/log/:/var/log/nginx/
ports:
- "80:80"
- "8080:8080"
environment:
- BACKEND=dashboard
- PORT=8080
- USERNAME=admin
- PASSWORD=pass
user-dashboard:
build:
context: user-dashboard
image: hyperledger/cello-user-dashboard
container_name: user-dashboard
links:
- mongo:dashboard_mongo
- dashboard
ports:
- "8081:8080"
environment:
- SV_BaseURL=http://dashboard:8080/api/
- RESTful_Server=dashboard:8080
- RESTful_BaseURL=/api/v2/
- DEBUG=node:*
- DEV=$DEV
volumes:
- ./user-dashboard:/usr/app/src
command: bash -c "cd /usr/app/src && [ "$DEV" = True ] && npm run dev || npm start"