forked from hyperledger-cello/cello
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
100 lines (95 loc) · 2.71 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
# This compose file will deploy the services, and bootup a mongo server.
# 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: 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: 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: 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: mongo:3.2
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: yeasy/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