-
Notifications
You must be signed in to change notification settings - Fork 10
/
docker-compose.template.yml
203 lines (194 loc) · 6.79 KB
/
docker-compose.template.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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
version: '3.9'
name: wallet-ecosystem
services:
wallet-enterprise-vid-issuer:
container_name: wallet-enterprise-vid-issuer
hostname: wallet-enterprise-vid-issuer
build:
context: $PWD/wallet-enterprise
dockerfile: development.Dockerfile
image: wallet-enterprise:dev-vid
restart: on-failure
ports:
- 8003:8003
depends_on:
wallet-db:
condition: service_healthy
volumes:
- ./wallet-enterprise:/app:rw
- ./wallet-enterprise-configurations/vid-issuer/dataset:/app/dataset:rw
- ./wallet-enterprise-configurations/vid-issuer/config/index.ts:/app/config/index.ts:rw
- ./wallet-enterprise-configurations/vid-issuer/keys:/app/keys:rw
- ./wallet-enterprise-configurations/vid-issuer/src/configuration:/app/src/configuration:rw
- ./wallet-enterprise-configurations/vid-issuer/public/images:/app/public/images:rw
- ./wallet-enterprise-configurations/vid-issuer/public/styles/main.css:/app/public/styles/main.css:rw
- ./.vscode/:/app/.vscode:rw
- type: tmpfs
target: /app/dist # Not /dist here because of relative imports that assume dist/ and keys/, views/ etc. are sibling dirs
tmpfs:
mode: 01777
deploy:
resources:
limits:
memory: 1G
wallet-enterprise-ehic-issuer:
container_name: wallet-enterprise-ehic-issuer
hostname: wallet-enterprise-ehic-issuer
build:
context: $PWD/wallet-enterprise
dockerfile: development.Dockerfile
image: wallet-enterprise:dev-ehic
restart: always
ports:
- 8004:8004
depends_on:
wallet-db:
condition: service_healthy
volumes:
- ./wallet-enterprise:/app:rw
- ./wallet-enterprise-configurations/ehic-issuer/dataset:/app/dataset:rw
- ./wallet-enterprise-configurations/ehic-issuer/config/index.ts:/app/config/index.ts:rw
- ./wallet-enterprise-configurations/ehic-issuer/keys:/app/keys:rw
- ./wallet-enterprise-configurations/ehic-issuer/src/configuration:/app/src/configuration:rw
- ./wallet-enterprise-configurations/ehic-issuer/public/images:/app/public/images:rw
- ./wallet-enterprise-configurations/ehic-issuer/public/styles/main.css:/app/public/styles/main.css:rw
- ./.vscode/:/app/.vscode:rw
- type: tmpfs
target: /app/dist # Not /dist here because of relative imports that assume dist/ and keys/, views/ etc. are sibling dirs
tmpfs:
mode: 01777
deploy:
resources:
limits:
memory: 1G
wallet-enterprise-diploma-issuer:
container_name: wallet-enterprise-diploma-issuer
hostname: wallet-enterprise-diploma-issuer
build:
context: $PWD/wallet-enterprise
dockerfile: development.Dockerfile
image: wallet-enterprise:dev-diploma
restart: on-failure
ports:
- 8000:8000
depends_on:
wallet-db:
condition: service_healthy
volumes:
- ./wallet-enterprise:/app:rw
- ./wallet-enterprise-configurations/diploma-issuer/dataset:/app/dataset:rw
- ./wallet-enterprise-configurations/diploma-issuer/config/index.ts:/app/config/index.ts:rw
- ./wallet-enterprise-configurations/diploma-issuer/keys:/app/keys:rw
- ./wallet-enterprise-configurations/diploma-issuer/src/configuration:/app/src/configuration:rw
- ./wallet-enterprise-configurations/diploma-issuer/public/images:/app/public/images:rw
- ./wallet-enterprise-configurations/diploma-issuer/public/styles/main.css:/app/public/styles/main.css:rw
- ./.vscode/:/app/.vscode:rw
- type: tmpfs
target: /app/dist
tmpfs:
mode: 01777
deploy:
resources:
limits:
memory: 1G
wallet-enterprise-acme-verifier:
container_name: wallet-enterprise-acme-verifier
hostname: wallet-enterprise-acme-verifier
build:
context: $PWD/wallet-enterprise
dockerfile: development.Dockerfile
image: wallet-enterprise:dev-verifier
restart: on-failure
ports:
- 8005:8005
depends_on:
wallet-db:
condition: service_healthy
volumes:
- ./wallet-enterprise:/app:rw
- ./wallet-enterprise-configurations/acme-verifier/config/index.ts:/app/config/index.ts:rw
- ./wallet-enterprise-configurations/acme-verifier/keys:/app/keys:rw
- ./wallet-enterprise-configurations/acme-verifier/src/configuration:/app/src/configuration:rw
- ./wallet-enterprise-configurations/acme-verifier/public/styles/main.css:/app/public/styles/main.css:rw
- ./wallet-enterprise-configurations/acme-verifier/public/images:/app/public/images:rw
- ./.vscode/:/app/.vscode:rw
- type: tmpfs
target: /app/dist
tmpfs:
mode: 01777
deploy:
resources:
limits:
memory: 1G
wallet-db:
image: mariadb
container_name: wallet-db
hostname: wallet-db
restart: on-failure
ports:
- 127.0.0.1:3307:3307
expose:
- 3307
environment:
MARIADB_HOST: wallet-db
MARIADB_ROOT_PASSWORD: root
MARIADB_USER: myuser
MARIADB_PASSWORD:
MYSQL_TCP_PORT: 3307
MYSQL_UNIX_PORT: 3307
healthcheck:
test: ["CMD", "mariadb" ,"-uroot", "-proot", "--protocol=TCP", "-hlocalhost", "--port=3307", "-estatus"]
start_period: 60s
#start_interval: 5s # Not yet supported it seems, but upcoming: https://github.com/docker/compose/issues/10830
interval: 5s # Delete this line when start_interval becomes supported
timeout: 2s
volumes:
# persist data files into `datadir` volume managed by docker
- datadir:/var/lib/mysql
# bind-mount any sql files that should be run while initializing
- ./db-setup/scripts/:/docker-entrypoint-initdb.d/
wallet-backend-server:
container_name: wallet-backend-server
build:
context: $PWD/wallet-backend-server
dockerfile: development.Dockerfile
image: wallet-backend-server:dev
restart: on-failure
ports:
- 8002:8002
depends_on:
wallet-db:
condition: service_healthy
volumes:
- ./wallet-backend-server:/app:rw
- ./.vscode/:/app/.vscode:rw
- type: tmpfs
target: /dist
tmpfs:
mode: 01777
deploy:
resources:
limits:
memory: 1G
wallet-frontend:
build:
context: $PWD/wallet-frontend
dockerfile: development.Dockerfile
image: wallet-frontend:dev
container_name: wallet-frontend
hostname: wallet-frontend
ports:
- 3000:3000
volumes:
- ./wallet-frontend/public:/app/public:rw
- ./wallet-frontend/src:/app/src:rw
- ./wallet-frontend/.env:/app/.env:rw
- ./.vscode/:/app/.vscode:rw
- type: tmpfs
target: /app/node_modules/.cache
tmpfs:
mode: 01777
volumes:
datadir:
cache:
driver: local