Skip to content

Commit 05e05ab

Browse files
committed
feat: create yml file to push docker images
Signed-off-by: [email protected] <[email protected]>
1 parent 97f54e1 commit 05e05ab

File tree

3 files changed

+270
-44
lines changed

3 files changed

+270
-44
lines changed

.github/workflows/cicd.yml renamed to .github/workflows/continuous-delivery.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@ name: Continuous Delivery
22

33
on:
44
push:
5-
branches:
6-
- feat/push-docker-image
5+
tags:
6+
- 'v*'
77

88
env:
99
REGISTRY: ghcr.io
10-
TAG: v2.0.0
1110

1211
jobs:
1312
build-and-push:
@@ -26,7 +25,6 @@ jobs:
2625
- issuance
2726
- ledger
2827
- notification
29-
- organization
3028
- user
3129
- utility
3230
- verification
@@ -40,6 +38,10 @@ jobs:
4038
- name: Checkout Repository
4139
uses: actions/checkout@v4
4240

41+
- name: Extract Git Tag
42+
id: get_tag
43+
run: echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
44+
4345
- name: Log in to GitHub Container Registry
4446
uses: docker/login-action@v3
4547
with:

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

0 commit comments

Comments
 (0)