-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathdocker-compose.yml
144 lines (137 loc) · 4.87 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
version: '3.7'
services:
mongo:
image: mongo:latest
container_name: "mongo"
restart: always
environment:
MONGO_INITDB_DATABASE: ${DATABASE_NAME}
MONGO_INITDB_ROOT_USERNAME: ${MONGO_INITDB_ROOT_USERNAME}
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_INITDB_ROOT_PASSWORD}
ports:
- 27017:27017
volumes:
- ./mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js:ro
- mongodb_data_container:/data/db
traefik:
image: "traefik:v2.6"
container_name: "traefik"
command:
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
ports:
- "3000:80"
- "8080:8080"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
initialize-audit-trail:
build:
context: ./api/audit-trail-gw
environment:
DATABASE_NAME: ${DATABASE_NAME}
IOTA_HORNET_NODE: ${IOTA_HORNET_NODE}
IOTA_PERMA_NODE: ${IOTA_PERMA_NODE}
DATABASE_URL: ${DATABASE_URL}
SERVER_SECRET: ${SERVER_SECRET}
JWT_SECRET: ${JWT_SECRET}
SSI_BRIDGE_URL: http://host.docker.internal:3000/api/v0.2
SSI_BRIDGE_API_KEY: ${API_KEY}
restart: on-failure
command: node dist/index.js setup-api
depends_on:
- mongo
- traefik
audit-trail-gw:
build:
context: ./api/audit-trail-gw
labels:
- "traefik.enable=true"
- "traefik.http.routers.audittrailgw.entrypoints=web"
- "traefik.http.middlewares.audit-trail-gw-stripprefix.stripprefix.prefixes=/audit-trail-gw"
- "traefik.http.middlewares.audit-trail-gw-stripprefix.stripprefix.forceslash=true"
- "traefik.http.routers.audittrailgw_ch.rule=PathPrefix(`/api/v0.1/channels`)"
- "traefik.http.routers.audittrailgw_ci.rule=PathPrefix(`/api/v0.1/channel-info`)"
- "traefik.http.routers.audittrailgw_sub.rule=PathPrefix(`/api/v0.1/subscriptions`)"
- "traefik.http.routers.audittrailgw_docs.rule=PathPrefix(`/audit-trail-gw/docs`)"
- "traefik.http.routers.audittrailgw_info.rule=PathPrefix(`/audit-trail-gw/info`)"
- "traefik.http.routers.audittrailgw_info.middlewares=audit-trail-gw-stripprefix"
- "traefik.http.services.audittrailgw.loadbalancer.server.port=3000"
environment:
PORT: 3000
DATABASE_NAME: ${DATABASE_NAME}
IOTA_HORNET_NODE: ${IOTA_HORNET_NODE}
IOTA_PERMA_NODE: ${IOTA_PERMA_NODE}
DATABASE_URL: ${DATABASE_URL}
SERVER_SECRET: ${SERVER_SECRET}
JWT_SECRET: ${JWT_SECRET}
SSI_BRIDGE_URL: http://host.docker.internal:3000/api/v0.2
SSI_BRIDGE_API_KEY: ${API_KEY}
restart: always
depends_on:
- mongo
- initialize-audit-trail
- traefik
initialize-ssi-bridge:
build:
context: ./api/ssi-bridge
environment:
DATABASE_NAME: ${DATABASE_NAME}
IOTA_HORNET_NODE: ${IOTA_HORNET_NODE}
IOTA_PERMA_NODE: ${IOTA_PERMA_NODE}
DATABASE_URL: ${DATABASE_URL}
SERVER_SECRET: ${SERVER_SECRET}
JWT_SECRET: ${JWT_SECRET}
restart: on-failure
command: node dist/index.js setup-api
depends_on:
- mongo
ssi-bridge:
build:
context: ./api/ssi-bridge
labels:
- "traefik.enable=true"
- "traefik.http.routers.ssibridge.entrypoints=web"
- "traefik.http.middlewares.ssi-bridge-stripprefix.stripprefix.prefixes=/ssi-bridge"
- "traefik.http.routers.ssibridge_id.rule=PathPrefix(`/api/v0.2/identities`) "
- "traefik.http.routers.ssibridge_auth.rule=PathPrefix(`/api/v0.2/authentication`)"
- "traefik.http.routers.ssibridge_ver.rule=PathPrefix(`/api/v0.2/verification`)"
- "traefik.http.routers.ssibridge_docs.rule=PathPrefix(`/ssi-bridge/docs`)"
- "traefik.http.routers.ssibridge_info.rule=Path(`/ssi-bridge/info`)"
- "traefik.http.routers.ssibridge_info.middlewares=ssi-bridge-stripprefix"
- "traefik.http.services.ssibridge.loadbalancer.server.port=3000"
environment:
PORT: 3000
DATABASE_NAME: ${DATABASE_NAME}
IOTA_HORNET_NODE: ${IOTA_HORNET_NODE}
IOTA_PERMA_NODE: ${IOTA_PERMA_NODE}
DATABASE_URL: ${DATABASE_URL}
SERVER_SECRET: ${SERVER_SECRET}
JWT_SECRET: ${JWT_SECRET}
restart: always
depends_on:
- mongo
- initialize-ssi-bridge
- traefik
dashboard:
build:
context: ./dashboard
container_name: "is-dashboard"
restart: always
labels:
- "traefik.enable=true"
- "traefik.http.routers.dashboard.entrypoints=web"
- "traefik.http.routers.dashboard.rule=PathPrefix(`/`)"
- "traefik.http.services.dashboard.loadbalancer.server.port=3000"
environment:
- VITE_IOTA_IS_SDK_API_KEY=${API_KEY}
- VITE_IOTA_IS_SDK_GATEWAY_URL=${GATEWAY_URL}
command: sh -c "npm run build && npm run prod"
depends_on:
- ssi-bridge
- audit-trail-gw
ports:
- "3055:3000"
volumes:
mongodb_data_container: