Skip to content

Commit fc78c85

Browse files
authored
feat/update-docker-compose (#1209)
* feat: add schema and seed service to docker-compose Signed-off-by: Sahil Kamble <[email protected]> * feat: add docker-compose-dev.yml Signed-off-by: Sahil Kamble <[email protected]> --------- Signed-off-by: Sahil Kamble <[email protected]>
1 parent 39c9565 commit fc78c85

File tree

3 files changed

+233
-48
lines changed

3 files changed

+233
-48
lines changed

.env.demo

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,3 +141,8 @@ ELK_PASSWORD=xxxxxx # ELK user password
141141
ORGANIZATION=credebl
142142
CONTEXT=platform
143143
APP=api
144+
145+
#Schema-file-server
146+
APP_PORT=4000
147+
JWT_TOKEN_SECRET=c2e48ca31ac2a0b9af47f3a9f5a0809a858c296948c1326eb746bb7bc945a9d5
148+
ISSUER=Credebl

docker-compose-dev.yml

Lines changed: 200 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,200 @@
1+
version: '3'
2+
3+
services:
4+
nats:
5+
container_name: nats
6+
entrypoint: '/nats-server -c /nats-server.conf -DV' # Corrected the path to nats-server.conf
7+
image: nats
8+
ports:
9+
- '4222:4222'
10+
- '6222:6222'
11+
- '8222:8222'
12+
# volumes:
13+
# - ./nats-server.conf:/nats-server.conf # Mount the config file
14+
redis:
15+
image: redis:6.2-alpine
16+
restart: always
17+
ports:
18+
- '6379:6379'
19+
command: redis-server --save 20 1 --loglevel warning
20+
volumes:
21+
- cache:/data
22+
api-gateway:
23+
depends_on:
24+
- nats # Use depends_on instead of needs
25+
- redis
26+
build:
27+
context: ./ # Adjust the context path as needed
28+
dockerfile: Dockerfiles/Dockerfile.api-gateway
29+
ports:
30+
- '5000:5000'
31+
env_file:
32+
- ./.env
33+
user:
34+
depends_on:
35+
- nats # Use depends_on instead of needs
36+
- api-gateway
37+
build:
38+
context: ./ # Adjust the context path as needed
39+
dockerfile: Dockerfiles/Dockerfile.user
40+
env_file:
41+
- ./.env
42+
utility:
43+
depends_on:
44+
- nats # Use depends_on instead of needs
45+
- api-gateway
46+
build:
47+
context: ./ # Adjust the context path as needed
48+
dockerfile: Dockerfiles/Dockerfile.utility
49+
env_file:
50+
- ./.env
51+
connection:
52+
depends_on:
53+
- nats # Use depends_on instead of needs
54+
- api-gateway
55+
- utility
56+
- user
57+
build:
58+
context: ./ # Adjust the context path as needed
59+
dockerfile: Dockerfiles/Dockerfile.connection
60+
env_file:
61+
- ./.env
62+
issuance:
63+
depends_on:
64+
- nats # Use depends_on instead of needs
65+
- redis
66+
- api-gateway
67+
- user
68+
- connection
69+
build:
70+
context: ./ # Adjust the context path as needed
71+
dockerfile: Dockerfiles/Dockerfile.issuance
72+
env_file:
73+
- ./.env
74+
ledger:
75+
depends_on:
76+
- nats # Use depends_on instead of needs
77+
- api-gateway
78+
- user
79+
- connection
80+
- issuance
81+
build:
82+
context: ./ # Adjust the context path as needed
83+
dockerfile: Dockerfiles/Dockerfile.ledger
84+
env_file:
85+
- ./.env
86+
organization:
87+
depends_on:
88+
- nats # Use depends_on instead of needs
89+
- api-gateway
90+
- user
91+
- connection
92+
- issuance
93+
- ledger
94+
build:
95+
context: ./ # Adjust the context path as needed
96+
dockerfile: Dockerfiles/Dockerfile.organization
97+
env_file:
98+
- ./.env
99+
verification:
100+
depends_on:
101+
- nats # Use depends_on instead of needs
102+
- api-gateway
103+
- user
104+
- connection
105+
- issuance
106+
- ledger
107+
- organization
108+
build:
109+
context: ./ # Adjust the context path as needed
110+
dockerfile: Dockerfiles/Dockerfile.verification
111+
env_file:
112+
- ./.env
113+
agent-provisioning:
114+
depends_on:
115+
- nats # Use depends_on instead of needs
116+
- api-gateway
117+
- user
118+
- connection
119+
- issuance
120+
- ledger
121+
- organization
122+
- verification
123+
build:
124+
context: ./ # Adjust the context path as needed
125+
dockerfile: Dockerfiles/Dockerfile.agent-provisioning
126+
args:
127+
- ROOT_PATH=$PWD/apps/agent-provisioning/AFJ/agent-config
128+
env_file:
129+
- ./.env
130+
environment:
131+
- ROOT_PATH=$PWD/apps/agent-provisioning/AFJ/agent-config
132+
volumes:
133+
- $PWD/apps/agent-provisioning/AFJ/agent-config:/app/agent-provisioning/AFJ/agent-config
134+
- /var/run/docker.sock:/var/run/docker.sock
135+
- /app/agent-provisioning/AFJ/token:/app/agent-provisioning/AFJ/token
136+
- $PWD/agent.env:/app/agent.env
137+
agent-service:
138+
depends_on:
139+
- nats # Use depends_on instead of needs
140+
- api-gateway
141+
- user
142+
- connection
143+
- issuance
144+
- ledger
145+
- organization
146+
- verification
147+
- agent-provisioning
148+
command: sh -c 'until (docker logs platform-agent-provisioning-1 | grep "Agent-Provisioning-Service Microservice is listening to NATS"); do sleep 1; done && node dist/apps/agent-service/main.js'
149+
build:
150+
context: ./ # Adjust the context path as needed
151+
dockerfile: Dockerfiles/Dockerfile.agent-service
152+
env_file:
153+
- ./.env
154+
volumes:
155+
- /var/run/docker.sock:/var/run/docker.sock
156+
volumes_from:
157+
- agent-provisioning
158+
cloud-wallet:
159+
depends_on:
160+
- nats
161+
- api-gateway
162+
build:
163+
context: ./ # Adjust the context path as needed
164+
dockerfile: Dockerfiles/Dockerfile.cloud-wallet
165+
env_file:
166+
- ./.env
167+
geolocation:
168+
depends_on:
169+
- nats
170+
- api-gateway
171+
build:
172+
context: ./ # Adjust the context path as needed
173+
dockerfile: Dockerfiles/Dockerfile.geolocation
174+
env_file:
175+
- ./.env
176+
notification:
177+
depends_on:
178+
- nats
179+
- api-gateway
180+
build:
181+
context: ./ # Adjust the context path as needed
182+
dockerfile: Dockerfiles/Dockerfile.notification
183+
env_file:
184+
- ./.env
185+
webhook:
186+
depends_on:
187+
- nats
188+
- api-gateway
189+
build:
190+
context: ./ # Adjust the context path as needed
191+
dockerfile: Dockerfiles/Dockerfile.webhook
192+
env_file:
193+
- ./.env
194+
195+
196+
197+
198+
volumes:
199+
cache:
200+
driver: local

docker-compose.yml

Lines changed: 28 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,18 @@ services:
1919
command: redis-server --save 20 1 --loglevel warning
2020
volumes:
2121
- cache:/data
22+
seed:
23+
container_name: seed-service
24+
image: ghcr.io/credebl/seed:latest
25+
env_file:
26+
- ./.env
27+
volumes:
28+
- $PWD/libs/prisma-service/prisma/data/credebl-master-table.json:/app/libs/prisma-service/prisma/data/credebl-master-table.json
2229
api-gateway:
2330
depends_on:
2431
- nats # Use depends_on instead of needs
2532
- redis
26-
build:
27-
context: ./ # Adjust the context path as needed
28-
dockerfile: Dockerfiles/Dockerfile.api-gateway
33+
image: ghcr.io/credebl/api-gateway:latest
2934
ports:
3035
- '5000:5000'
3136
env_file:
@@ -34,18 +39,14 @@ services:
3439
depends_on:
3540
- nats # Use depends_on instead of needs
3641
- api-gateway
37-
build:
38-
context: ./ # Adjust the context path as needed
39-
dockerfile: Dockerfiles/Dockerfile.user
42+
image: ghcr.io/credebl/user:latest
4043
env_file:
4144
- ./.env
4245
utility:
4346
depends_on:
4447
- nats # Use depends_on instead of needs
4548
- api-gateway
46-
build:
47-
context: ./ # Adjust the context path as needed
48-
dockerfile: Dockerfiles/Dockerfile.utility
49+
image: ghcr.io/credebl/utility:latest
4950
env_file:
5051
- ./.env
5152
connection:
@@ -54,21 +55,16 @@ services:
5455
- api-gateway
5556
- utility
5657
- user
57-
build:
58-
context: ./ # Adjust the context path as needed
59-
dockerfile: Dockerfiles/Dockerfile.connection
58+
image: ghcr.io/credebl/connection:latest
6059
env_file:
6160
- ./.env
6261
issuance:
6362
depends_on:
6463
- nats # Use depends_on instead of needs
65-
- redis
6664
- api-gateway
6765
- user
6866
- connection
69-
build:
70-
context: ./ # Adjust the context path as needed
71-
dockerfile: Dockerfiles/Dockerfile.issuance
67+
image: ghcr.io/credebl/issuance:latest
7268
env_file:
7369
- ./.env
7470
ledger:
@@ -78,9 +74,7 @@ services:
7874
- user
7975
- connection
8076
- issuance
81-
build:
82-
context: ./ # Adjust the context path as needed
83-
dockerfile: Dockerfiles/Dockerfile.ledger
77+
image: ghcr.io/credebl/ledger:latest
8478
env_file:
8579
- ./.env
8680
organization:
@@ -91,9 +85,7 @@ services:
9185
- connection
9286
- issuance
9387
- ledger
94-
build:
95-
context: ./ # Adjust the context path as needed
96-
dockerfile: Dockerfiles/Dockerfile.organization
88+
image: ghcr.io/credebl/organization:latest
9789
env_file:
9890
- ./.env
9991
verification:
@@ -105,9 +97,7 @@ services:
10597
- issuance
10698
- ledger
10799
- organization
108-
build:
109-
context: ./ # Adjust the context path as needed
110-
dockerfile: Dockerfiles/Dockerfile.verification
100+
image: ghcr.io/credebl/verification:latest
111101
env_file:
112102
- ./.env
113103
agent-provisioning:
@@ -120,11 +110,9 @@ services:
120110
- ledger
121111
- organization
122112
- verification
123-
build:
124-
context: ./ # Adjust the context path as needed
125-
dockerfile: Dockerfiles/Dockerfile.agent-provisioning
126-
args:
127-
- ROOT_PATH=$PWD/apps/agent-provisioning/AFJ/agent-config
113+
image: ghcr.io/credebl/agent-provisioning:latest
114+
# args:
115+
# - ROOT_PATH=$PWD/apps/agent-provisioning/AFJ/agent-config
128116
env_file:
129117
- ./.env
130118
environment:
@@ -146,9 +134,7 @@ services:
146134
- verification
147135
- agent-provisioning
148136
command: sh -c 'until (docker logs platform-agent-provisioning-1 | grep "Agent-Provisioning-Service Microservice is listening to NATS"); do sleep 1; done && node dist/apps/agent-service/main.js'
149-
build:
150-
context: ./ # Adjust the context path as needed
151-
dockerfile: Dockerfiles/Dockerfile.agent-service
137+
image: ghcr.io/credebl/agent-service:latest
152138
env_file:
153139
- ./.env
154140
volumes:
@@ -159,41 +145,35 @@ services:
159145
depends_on:
160146
- nats
161147
- api-gateway
162-
build:
163-
context: ./ # Adjust the context path as needed
164-
dockerfile: Dockerfiles/Dockerfile.cloud-wallet
148+
image: ghcr.io/credebl/cloud-wallet:latest
165149
env_file:
166150
- ./.env
167151
geolocation:
168152
depends_on:
169153
- nats
170154
- api-gateway
171-
build:
172-
context: ./ # Adjust the context path as needed
173-
dockerfile: Dockerfiles/Dockerfile.geolocation
155+
image: ghcr.io/credebl/geolocation:latest
174156
env_file:
175157
- ./.env
176158
notification:
177159
depends_on:
178160
- nats
179161
- api-gateway
180-
build:
181-
context: ./ # Adjust the context path as needed
182-
dockerfile: Dockerfiles/Dockerfile.notification
162+
image: ghcr.io/credebl/notification:latest
183163
env_file:
184164
- ./.env
185165
webhook:
186166
depends_on:
187167
- nats
188168
- api-gateway
189-
build:
190-
context: ./ # Adjust the context path as needed
191-
dockerfile: Dockerfiles/Dockerfile.webhook
169+
image: ghcr.io/credebl/webhook:latest
170+
env_file:
171+
- ./.env
172+
schema-file-server:
173+
container_name: schema-file-server
174+
image: ghcr.io/credebl/schema-file-server:latest
192175
env_file:
193176
- ./.env
194-
195-
196-
197177

198178
volumes:
199179
cache:

0 commit comments

Comments
 (0)