forked from hyperledger/cello
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-dev.yml
160 lines (150 loc) · 4.54 KB
/
docker-compose-dev.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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
# 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.
# cello-nginx: proxy to access operator dashboard service, listen on 8080
# cello-operator-dashboard: dashboard service for operators
# cello-user-dashboard: user service of cello, listen on 8081
# engine: engine service of cello to provide RESTful APIs, listen on 80
# cello-mongo: mongo db
version: '3.2'
services:
# nginx as front end for the operator dashboard
nginx:
image: hyperledger/cello-nginx
hostname: cello-nginx
container_name: cello-nginx
restart: always
deploy:
resources:
limits:
cpus: '0.50'
memory: 2048M
reservations:
cpus: '0.10'
memory: 256M
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.default.conf
#- /opt/cello/nginx/log/:/var/log/nginx/
ports:
- "80:80"
- "8080:8080"
environment:
- BACKEND=cello-operator-dashboard
- PORT=8080
- USERNAME=admin
- PASSWORD=pass
# cello dashboard service for network operator
operator-dashboard:
image: hyperledger/cello-operator-dashboard
container_name: cello-operator-dashboard
hostname: cello-operator-dashboard
restart: unless-stopped
environment:
- MONGO_URL=mongodb://cello-mongo:27017
- MONGO_DB=dev
- DEBUG=$DEV # in debug mode, service will auto-restart
- LOG_LEVEL=$LOG_LEVEL # what level log will be output
- STATIC_FOLDER=$STATIC_FOLDER
- TEMPLATE_FOLDER=$TEMPLATE_FOLDER
- ENABLE_EMAIL_ACTIVE=$ENABLE_EMAIL_ACTIVE
expose:
- "8080"
volumes: # This should be removed in product env
- ./src:/app
#TODO: need to follow other images to put at dockerhub
user-dashboard:
image: hyperledger/cello-user-dashboard
container_name: cello-user-dashboard
hostname: cello-user-dashboard
links:
- mongo:dashboard_mongo
- dashboard_mongo
- operator-dashboard
ports:
- "8081:8080"
environment:
- RESTFUL_SERVER=operator-dashboard:8080
- DEBUG=node:*
- DEV=$DEV
- LOG_LEVEL=$LOG_LEVEL
- ENABLE_EMAIL_ACTIVE=$ENABLE_EMAIL_ACTIVE
- SMTP_SERVER=$SMTP_SERVER
- SMTP_PORT=$SMTP_PORT
- SMTP_AUTH_USERNAME=$SMTP_AUTH_USERNAME
- SMTP_AUTH_PASSWORD=$SMTP_AUTH_PASSWORD
- FROM_EMAIL=$FROM_EMAIL
- WEBROOT=$USER_DASHBOARD_WEBROOT
- FABRIC_CFG_PATH=/etc/hyperledger/fabric
volumes:
- ./user-dashboard/src:/var/www
- /opt/cello/baas:/opt/data
# cello engine service
engine:
image: hyperledger/cello-engine
container_name: cello-engine
hostname: cello-engine
restart: unless-stopped
environment:
- MONGO_URL=mongodb://cello-mongo:27017
- MONGO_DB=dev
- DEBUG=$DEV # in debug mode, service will auto-restart
- LOG_LEVEL=$LOG_LEVEL # what level log will be output
expose:
- "80"
volumes: # This should be removed in product env
- ./src:/app
# cello watchdog service
watchdog:
image: hyperledger/cello-watchdog
container_name: cello-watchdog
hostname: cello-watchdog
restart: unless-stopped
environment:
- MONGO_URL=mongodb://cello-mongo:27017
- MONGO_DB=dev
- DEBUG=$DEV # in debug mode, service will auto-restart
- LOG_LEVEL=$LOG_LEVEL # 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: cello-mongo
container_name: cello-mongo
restart: unless-stopped
deploy:
resources:
limits:
cpus: '0.50'
memory: 2048M
reservations:
cpus: '0.10'
memory: 256M
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
# TODO: we may use one mongo instance, that should be enough
dashboard_mongo:
image: hyperledger/cello-mongo
restart: unless-stopped
environment:
- NO_USED=0
volumes:
- /opt/cello/dashboard_mongo:/data/db
nfs:
image: itsthenetwork/nfs-server-alpine:9
restart: unless-stopped
environment:
- SHARED_DIRECTORY=/cello
volumes:
- ./src/agent/docker/_compose_files:/cello
privileged: true
network_mode: host