Skip to content

Commit 9cfb001

Browse files
Merge pull request #1195 from credebl/develop
Merge: Dev to Qa (25/04/2024)
2 parents 7bf932c + d1f0679 commit 9cfb001

File tree

117 files changed

+6164
-39088
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

117 files changed

+6164
-39088
lines changed

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

.env.demo

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ AFJ_AGENT_SPIN_UP=/agent-provisioning/AFJ/scripts/docker_start_agent.sh
121121
AFJ_AGENT_ENDPOINT_PATH=/agent-provisioning/AFJ/endpoints/
122122
# Uncomment bellow three lines and comment the above to start services locally without using docker, using pnpm
123123
# AFJ_AGENT_TOKEN_PATH=/apps/agent-provisioning/AFJ/token/
124-
# AFJ_AGENT_SPIN_UP=/apps/agent-provisioning/AFJ/scripts/docker_start_agent.sh
124+
# AFJ_AGENT_SPIN_UP=/apps/agent-provisioning/AFJ/scripts/start_agent.sh
125125
# AFJ_AGENT_ENDPOINT_PATH=/apps/agent-provisioning/AFJ/endpoints/
126126

127127
AGENT_PROTOCOL=http
@@ -131,13 +131,13 @@ MAX_ORG_LIMIT=10
131131
FIDO_API_ENDPOINT=http://localhost:8000
132132

133133
IS_ECOSYSTEM_ENABLE=false
134-
CONSOLE_LOG_FLAG=true // Enable or disable console ELK logs
135-
ELK_LOG=true // ELK flag
136-
LOG_LEVEL=debug // ELK log level
137-
ELK_LOG_PATH = "http://localhost:9200/" // ELK log path
138-
ELK_USERNAME=elastic // ELK user username
139-
ELK_PASSWORD=xxxxxx // ELK user password
134+
CONSOLE_LOG_FLAG=true # Enable or disable console ELK logs
135+
ELK_LOG=false # ELK flag
136+
LOG_LEVEL=debug # ELK log level
137+
ELK_LOG_PATH= "http://localhost:9200/" # ELK log path
138+
ELK_USERNAME=elastic # ELK user username
139+
ELK_PASSWORD=xxxxxx # ELK user password
140140

141141
ORGANIZATION=credebl
142142
CONTEXT=platform
143-
APP=api
143+
APP=api
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Continuous Delivery
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
env:
9+
REGISTRY: ghcr.io
10+
11+
jobs:
12+
build-and-push:
13+
name: Push Docker image to GitHub
14+
runs-on: ubuntu-latest
15+
16+
strategy:
17+
matrix:
18+
service:
19+
- agent-provisioning
20+
- agent-service
21+
- api-gateway
22+
- cloud-wallet
23+
- connection
24+
- geolocation
25+
- issuance
26+
- ledger
27+
- notification
28+
- user
29+
- utility
30+
- verification
31+
- webhook
32+
33+
permissions:
34+
contents: read
35+
packages: write
36+
37+
steps:
38+
- name: Checkout Repository
39+
uses: actions/checkout@v4
40+
41+
- name: Extract Git Tag
42+
id: get_tag
43+
run: echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
44+
45+
- name: Log in to GitHub Container Registry
46+
uses: docker/login-action@v3
47+
with:
48+
registry: ghcr.io
49+
username: ${{ github.actor }}
50+
password: ${{ secrets.GITHUB_TOKEN }}
51+
52+
- name: Build and Push Docker Image ${{ matrix.service }}
53+
uses: docker/build-push-action@v6
54+
with:
55+
context: .
56+
file: Dockerfiles/Dockerfile.${{ matrix.service }}
57+
push: true
58+
tags: |
59+
${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ matrix.service }}:${{ env.TAG }}
60+
${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ matrix.service }}:latest

.nvmrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

Dockerfiles/Dockerfile.agent-provisioning

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ COPY . .
2929

3030
# Generate Prisma client
3131
# RUN cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate
32-
RUN cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate
32+
RUN cd libs/prisma-service && npx prisma generate
3333
RUN ls -R /app/apps/agent-provisioning/AFJ/
3434

3535
# Build the user service
@@ -68,6 +68,7 @@ COPY --from=build /app/apps/agent-provisioning/AFJ/port-file ./agent-provisionin
6868
RUN chmod +x /app/agent-provisioning/AFJ/scripts/start_agent.sh
6969
RUN chmod +x /app/agent-provisioning/AFJ/scripts/start_agent_ecs.sh
7070
RUN chmod +x /app/agent-provisioning/AFJ/scripts/docker_start_agent.sh
71+
RUN chmod +x /app/agent-provisioning/AFJ/scripts/fargate.sh
7172
RUN chmod 777 /app/agent-provisioning/AFJ/endpoints
7273
RUN chmod 777 /app/agent-provisioning/AFJ/agent-config
7374
RUN chmod 777 /app/agent-provisioning/AFJ/token
@@ -76,4 +77,4 @@ RUN chmod 777 /app/agent-provisioning/AFJ/token
7677
COPY libs/ ./libs/
7778

7879
# Set the command to run the microservice
79-
CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && cd ../.. && node dist/apps/agent-provisioning/main.js"]
80+
CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/agent-provisioning/main.js"]

Dockerfiles/Dockerfile.agent-service

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ RUN pnpm i --ignore-scripts
2424
# Copy the rest of the application code
2525
COPY . .
2626
# RUN cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate
27-
RUN cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate
27+
RUN cd libs/prisma-service && npx prisma generate
2828

2929
# Build the user service
3030
RUN pnpm run build agent-service
@@ -53,4 +53,4 @@ COPY --from=build /app/libs/ ./libs/
5353
COPY --from=build /app/node_modules ./node_modules
5454

5555
# Set the command to run the microservice
56-
CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && cd ../.. && node dist/apps/agent-service/main.js"]
56+
CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/agent-service/main.js"]

Dockerfiles/Dockerfile.api-gateway

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ RUN pnpm i --ignore-scripts
1818
# Copy the rest of the application code
1919
COPY . .
2020
# RUN cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate
21-
RUN cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate
21+
RUN cd libs/prisma-service && npx prisma generate
2222

2323
# Build the api-gateway service
2424
RUN pnpm run build api-gateway
@@ -40,4 +40,4 @@ COPY --from=build /app/node_modules ./node_modules
4040
# COPY --from=build /app/uploadedFiles ./uploadedFiles
4141

4242
# Set the command to run the microservice
43-
CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && cd ../.. && node dist/apps/api-gateway/main.js"]
43+
CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/api-gateway/main.js"]

Dockerfiles/Dockerfile.cloud-wallet

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ RUN pnpm i --ignore-scripts
1919
# Copy the rest of the application code
2020
COPY . .
2121
# RUN cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate
22-
RUN cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate
22+
RUN cd libs/prisma-service && npx prisma generate
2323

2424
# Build the user service
2525
RUN pnpm run build cloud-wallet
@@ -43,4 +43,4 @@ COPY --from=build /app/node_modules ./node_modules
4343

4444

4545
# Set the command to run the microservice
46-
CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && cd ../.. && node dist/apps/cloud-wallet/main.js"]
46+
CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/cloud-wallet/main.js"]

Dockerfiles/Dockerfile.connection

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ RUN pnpm i --ignore-scripts
1818
# Copy the rest of the application code
1919
COPY . .
2020
# RUN cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate
21-
RUN cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate
21+
RUN cd libs/prisma-service && npx prisma generate
2222

2323
# Build the connection service
2424
RUN pnpm run build connection
@@ -43,4 +43,4 @@ COPY --from=build /app/node_modules ./node_modules
4343
#RUN npm i --only=production
4444

4545
# Set the command to run the microservice
46-
CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && cd ../.. && node dist/apps/connection/main.js"]
46+
CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/connection/main.js"]

Dockerfiles/Dockerfile.geolocation

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ RUN pnpm i --ignore-scripts
1818
# Copy the rest of the application code
1919
COPY . .
2020
# RUN cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate
21-
RUN cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate
21+
RUN cd libs/prisma-service && npx prisma generate
2222

2323
# Build the connection service
2424
RUN pnpm run build geo-location
@@ -43,4 +43,4 @@ COPY --from=build /app/node_modules ./node_modules
4343
#RUN npm i --only=production
4444

4545
# Set the command to run the microservice
46-
CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && cd ../.. && node dist/apps/geo-location/main.js"]
46+
CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/geo-location/main.js"]

0 commit comments

Comments
 (0)