forked from tech-bureau/catapult-service-bootstrap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
157 lines (141 loc) · 5.22 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
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
# Copyright 2018 Tech Bureau, Corp
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http:#www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
version: '2'
services:
###### dynamic configuration ###########
generate-raw-addresses:
image: techbureau/catapult-tools:gcc-0.2.0.2
command: bash -c "/bin-mount/generate-raw-addresses-if-needed 50 /addresses/raw-addresses.txt /addresses/addresses.yaml"
volumes:
- ./bin/bash:/bin-mount
- ./build/generated-addresses:/addresses:rw
- ./build/state:/state:rw
store-addresses:
build: dockerfiles/ruby-alpine
command: ash -c "/bin-mount/wait /addresses/raw-addresses.txt && /ruby/bin/store-addresses-if-needed.rb /addresses/raw-addresses.txt /addresses/addresses.yaml"
volumes:
- ./bin/ash:/bin-mount
- ./ruby:/ruby
- ./build/generated-addresses:/addresses:rw
generate-configs:
build: dockerfiles/ruby-alpine
command: ash -c "/bin-mount/wait /addresses/addresses.yaml && /ruby/bin/generate-and-write-configurations.rb /addresses/addresses.yaml /config-build /nemesis && touch /state/configs-generated"
volumes:
- ./bin/ash:/bin-mount
- ./ruby:/ruby
- ./build/generated-addresses:/addresses
- ./build/catapult-config:/config-build
- ./build/nemesis:/nemesis:rw
- ./build/state:/state:rw
###### running services ###########
db:
image: mongo
command: bash -c "mongod --dbpath=/dbdata --bind_ip=db"
stop_signal: SIGINT
volumes:
- ./data/mongo:/dbdata:rw
- ./bin/bash:/bin-mount
init-db:
image: mongo
command: bash -c "/bin/bash /userconfig/mongors.sh"
volumes:
- ./data/mongo:/dbdata:rw
- ./static-config/mongo/:/userconfig/:ro
- ./bin/bash:/bin-mount
depends_on:
- db
rest-gateway:
image: techbureau/catapult-rest-server:1.0.8
command: ash -c "/bin-mount/wait /state/configs-generated && npm start resources/rest.json /userconfig/rest.json"
ports:
- "3000:3000"
volumes:
- ./build/catapult-config/rest-gateway-0/userconfig/:/userconfig/
- ./bin/ash:/bin-mount
- ./build/state:/state
depends_on:
- init-db
- generate-configs
peer-node-0-nemgen:
build: dockerfiles/nemgen
command: bash -c "/bin-mount/wait /state/configs-generated && /bin/bash /userconfig/nemgen.sh && touch /state/peer-node-0-nemgen"
stop_signal: SIGINT
volumes:
- ./build/catapult-config/peer-node-0/userconfig/resources/:/userconfig/resources/
- ./build/nemesis/:/nemesis
- ./data/peer-node-0:/data:rw
- ./bin/bash:/bin-mount
- ./build/state:/state:rw
depends_on:
- generate-configs
peer-node-0:
build: dockerfiles/catapult
command: bash -c "/bin-mount/wait /state/peer-node-0-nemgen && /bin/bash /userconfig/startServer.sh"
stop_signal: SIGINT
volumes:
- ./build/catapult-config/peer-node-0/userconfig/resources/:/userconfig/resources/
- ./data/peer-node-0:/data:rw
- ./bin/bash:/bin-mount
- ./build/state:/state
depends_on:
- generate-configs
- peer-node-0-nemgen
peer-node-1-nemgen:
build: dockerfiles/nemgen
command: bash -c "/bin-mount/wait /state/configs-generated && /bin/bash /userconfig/nemgen.sh && touch /state/peer-node-1-nemgen"
stop_signal: SIGINT
volumes:
- ./build/catapult-config/peer-node-1/userconfig/resources/:/userconfig/resources/
- ./build/nemesis/:/nemesis
- ./data/peer-node-1:/data:rw
- ./bin/bash:/bin-mount
- ./build/state:/state:rw
depends_on:
- generate-configs
peer-node-1:
build: dockerfiles/catapult
command: bash -c "/bin-mount/wait /state/peer-node-1-nemgen && /bin/bash /userconfig/startServer.sh"
stop_signal: SIGINT
volumes:
- ./build/catapult-config/peer-node-1/userconfig/resources/:/userconfig/resources/
- ./data/peer-node-1:/data:rw
- ./bin/bash:/bin-mount
- ./build/state:/state
depends_on:
- generate-configs
- peer-node-1-nemgen
api-node-0-nemgen:
build: dockerfiles/nemgen
command: bash -c "/bin-mount/wait /state/configs-generated && /bin/bash /userconfig/nemgen.sh && touch /state/api-node-0-nemgen"
stop_signal: SIGINT
volumes:
- ./build/catapult-config/api-node-0/userconfig/resources/:/userconfig/resources/
- ./build/nemesis/:/nemesis
- ./data/api-node-0:/data:rw
- ./bin/bash:/bin-mount
- ./build/state:/state:rw
depends_on:
- generate-configs
api-node-0:
build: dockerfiles/catapult
command: bash -c "/bin-mount/wait /state/api-node-0-nemgen && /bin/bash /userconfig/startServer.sh"
stop_signal: SIGINT
volumes:
- ./build/catapult-config/api-node-0/userconfig/resources/:/userconfig/resources/
- ./data/api-node-0:/data:rw
- ./bin/bash:/bin-mount
- ./build/state:/state
depends_on:
- generate-configs
- api-node-0-nemgen