From c8f4c154b2fd5673d364550a82b67397cf3c431d Mon Sep 17 00:00:00 2001 From: "sahil.kamble@ayanworks.com" Date: Tue, 31 Mar 2026 19:57:36 +0530 Subject: [PATCH 1/6] feat: udpate dockerfile for migration Signed-off-by: sahil.kamble@ayanworks.com --- Dockerfiles/Dockerfile.api-gateway | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfiles/Dockerfile.api-gateway b/Dockerfiles/Dockerfile.api-gateway index 2d9232312..04e230498 100644 --- a/Dockerfiles/Dockerfile.api-gateway +++ b/Dockerfiles/Dockerfile.api-gateway @@ -23,4 +23,4 @@ COPY --from=build /app/dist/apps/api-gateway/ ./dist/apps/api-gateway/ COPY --from=build /app/libs/ ./libs/ COPY --from=build /app/node_modules ./node_modules USER nextjs -CMD ["node", "dist/apps/api-gateway/main.js"] +CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/api-gateway/main.js"] \ No newline at end of file From c38b6a51d1e5f94908dd202df15853b982533e6a Mon Sep 17 00:00:00 2001 From: "sahil.kamble@ayanworks.com" Date: Wed, 1 Apr 2026 11:07:22 +0530 Subject: [PATCH 2/6] feat: udpate dockerfiles for migration Signed-off-by: sahil.kamble@ayanworks.com --- Dockerfiles/Dockerfile.agent-service | 2 +- Dockerfiles/Dockerfile.cloud-wallet | 2 +- Dockerfiles/Dockerfile.connection | 2 +- Dockerfiles/Dockerfile.ecosystem | 2 +- Dockerfiles/Dockerfile.geolocation | 2 +- Dockerfiles/Dockerfile.issuance | 2 +- Dockerfiles/Dockerfile.ledger | 2 +- Dockerfiles/Dockerfile.notification | 2 +- Dockerfiles/Dockerfile.oid4vc-issuance | 2 +- Dockerfiles/Dockerfile.oid4vc-verification | 2 +- Dockerfiles/Dockerfile.organization | 2 +- Dockerfiles/Dockerfile.user | 2 +- Dockerfiles/Dockerfile.utility | 2 +- Dockerfiles/Dockerfile.verification | 2 +- Dockerfiles/Dockerfile.webhook | 2 +- Dockerfiles/Dockerfile.x509 | 2 +- 16 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Dockerfiles/Dockerfile.agent-service b/Dockerfiles/Dockerfile.agent-service index 1e6a1dbd3..986f5581f 100644 --- a/Dockerfiles/Dockerfile.agent-service +++ b/Dockerfiles/Dockerfile.agent-service @@ -33,4 +33,4 @@ COPY --from=build /app/dist/apps/agent-service/ ./dist/apps/agent-service/ COPY --from=build /app/libs/ ./libs/ COPY --from=build /app/node_modules ./node_modules USER nextjs -CMD ["node", "dist/apps/agent-service/main.js"] +CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/agent-service/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.cloud-wallet b/Dockerfiles/Dockerfile.cloud-wallet index 1f60b6ba4..56c92372f 100644 --- a/Dockerfiles/Dockerfile.cloud-wallet +++ b/Dockerfiles/Dockerfile.cloud-wallet @@ -23,4 +23,4 @@ COPY --from=build /app/dist/apps/cloud-wallet/ ./dist/apps/cloud-wallet/ COPY --from=build /app/libs/ ./libs/ COPY --from=build /app/node_modules ./node_modules USER nextjs -CMD ["node", "dist/apps/cloud-wallet/main.js"] +CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/cloud-wallet/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.connection b/Dockerfiles/Dockerfile.connection index efda730c8..47b883526 100644 --- a/Dockerfiles/Dockerfile.connection +++ b/Dockerfiles/Dockerfile.connection @@ -23,4 +23,4 @@ COPY --from=build /app/dist/apps/connection/ ./dist/apps/connection/ COPY --from=build /app/libs/ ./libs/ COPY --from=build /app/node_modules ./node_modules USER nextjs -CMD ["node", "dist/apps/connection/main.js"] +CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/connection/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.ecosystem b/Dockerfiles/Dockerfile.ecosystem index 05706725b..8ad26fa77 100644 --- a/Dockerfiles/Dockerfile.ecosystem +++ b/Dockerfiles/Dockerfile.ecosystem @@ -23,4 +23,4 @@ COPY --from=build /app/dist/apps/ecosystem/ ./dist/apps/ecosystem/ COPY --from=build /app/libs/ ./libs/ COPY --from=build /app/node_modules ./node_modules USER nextjs -CMD ["node", "dist/apps/ecosystem/main.js"] +CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/ecosystem/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.geolocation b/Dockerfiles/Dockerfile.geolocation index 93cedacee..52972f084 100644 --- a/Dockerfiles/Dockerfile.geolocation +++ b/Dockerfiles/Dockerfile.geolocation @@ -23,4 +23,4 @@ COPY --from=build /app/dist/apps/geo-location/ ./dist/apps/geo-location/ COPY --from=build /app/libs/ ./libs/ COPY --from=build /app/node_modules ./node_modules USER nextjs -CMD ["node", "dist/apps/geo-location/main.js"] +CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/geo-location/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.issuance b/Dockerfiles/Dockerfile.issuance index 30f8e7d56..b2fd32310 100644 --- a/Dockerfiles/Dockerfile.issuance +++ b/Dockerfiles/Dockerfile.issuance @@ -23,4 +23,4 @@ COPY --from=build /app/dist/apps/issuance/ ./dist/apps/issuance/ COPY --from=build /app/libs/ ./libs/ COPY --from=build /app/node_modules ./node_modules USER nextjs -CMD ["node", "dist/apps/issuance/main.js"] +CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/issuance/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.ledger b/Dockerfiles/Dockerfile.ledger index a9fd0a0b8..c9c5b62ff 100644 --- a/Dockerfiles/Dockerfile.ledger +++ b/Dockerfiles/Dockerfile.ledger @@ -23,4 +23,4 @@ COPY --from=build /app/dist/apps/ledger/ ./dist/apps/ledger/ COPY --from=build /app/libs/ ./libs/ COPY --from=build /app/node_modules ./node_modules USER nextjs -CMD ["node", "dist/apps/ledger/main.js"] +CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/ledger/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.notification b/Dockerfiles/Dockerfile.notification index ceea80686..0acdcdde8 100644 --- a/Dockerfiles/Dockerfile.notification +++ b/Dockerfiles/Dockerfile.notification @@ -22,4 +22,4 @@ COPY --from=build /app/dist/apps/notification/ ./dist/apps/notification/ COPY --from=build /app/libs/ ./libs/ COPY --from=build /app/node_modules ./node_modules USER nextjs -CMD ["node", "dist/apps/notification/main.js"] +CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/notification/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.oid4vc-issuance b/Dockerfiles/Dockerfile.oid4vc-issuance index 6c04387f3..ebb4c00c0 100644 --- a/Dockerfiles/Dockerfile.oid4vc-issuance +++ b/Dockerfiles/Dockerfile.oid4vc-issuance @@ -22,4 +22,4 @@ COPY --from=build /app/dist/apps/oid4vc-issuance/ ./dist/apps/oid4vc-issuance/ COPY --from=build /app/libs/ ./libs/ COPY --from=build /app/node_modules ./node_modules USER nextjs -CMD ["node", "dist/apps/oid4vc-issuance/main.js"] +CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/oid4vc-issuance/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.oid4vc-verification b/Dockerfiles/Dockerfile.oid4vc-verification index 794fcb39a..592d5c2b0 100644 --- a/Dockerfiles/Dockerfile.oid4vc-verification +++ b/Dockerfiles/Dockerfile.oid4vc-verification @@ -23,4 +23,4 @@ COPY --from=build /app/dist/apps/oid4vc-verification/ ./dist/apps/oid4vc-verific COPY --from=build /app/libs/ ./libs/ COPY --from=build /app/node_modules ./node_modules USER nextjs -CMD ["node", "dist/apps/oid4vc-verification/main.js"] +CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/oid4vc-verification/main.js"] diff --git a/Dockerfiles/Dockerfile.organization b/Dockerfiles/Dockerfile.organization index 906320b05..9ba993330 100644 --- a/Dockerfiles/Dockerfile.organization +++ b/Dockerfiles/Dockerfile.organization @@ -23,4 +23,4 @@ COPY --from=build /app/dist/apps/organization/ ./dist/apps/organization/ COPY --from=build /app/libs/ ./libs/ COPY --from=build /app/node_modules ./node_modules USER nextjs -CMD ["node", "dist/apps/organization/main.js"] +CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/organization/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.user b/Dockerfiles/Dockerfile.user index 71e27d050..2ae42e3c5 100644 --- a/Dockerfiles/Dockerfile.user +++ b/Dockerfiles/Dockerfile.user @@ -23,4 +23,4 @@ COPY --from=build /app/dist/apps/user/ ./dist/apps/user/ COPY --from=build /app/libs/ ./libs/ COPY --from=build /app/node_modules ./node_modules USER nextjs -CMD ["node", "dist/apps/user/main.js"] +CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/user/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.utility b/Dockerfiles/Dockerfile.utility index 6f696be41..b9892c5a3 100644 --- a/Dockerfiles/Dockerfile.utility +++ b/Dockerfiles/Dockerfile.utility @@ -23,4 +23,4 @@ COPY --from=build /app/dist/apps/utility/ ./dist/apps/utility/ COPY --from=build /app/libs/ ./libs/ COPY --from=build /app/node_modules ./node_modules USER nextjs -CMD ["node", "dist/apps/utility/main.js"] +CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/utility/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.verification b/Dockerfiles/Dockerfile.verification index 013c6afe6..0b8b9af4a 100644 --- a/Dockerfiles/Dockerfile.verification +++ b/Dockerfiles/Dockerfile.verification @@ -23,4 +23,4 @@ COPY --from=build /app/dist/apps/verification/ ./dist/apps/verification/ COPY --from=build /app/libs/ ./libs/ COPY --from=build /app/node_modules ./node_modules USER nextjs -CMD ["node", "dist/apps/verification/main.js"] +CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/verification/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.webhook b/Dockerfiles/Dockerfile.webhook index 67d516d57..c89e75963 100644 --- a/Dockerfiles/Dockerfile.webhook +++ b/Dockerfiles/Dockerfile.webhook @@ -23,4 +23,4 @@ COPY --from=build /app/dist/apps/webhook/ ./dist/apps/webhook/ COPY --from=build /app/libs/ ./libs/ COPY --from=build /app/node_modules ./node_modules USER nextjs -CMD ["node", "dist/apps/webhook/main.js"] +CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/webhook/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.x509 b/Dockerfiles/Dockerfile.x509 index d1e4cd756..77b2a7630 100644 --- a/Dockerfiles/Dockerfile.x509 +++ b/Dockerfiles/Dockerfile.x509 @@ -23,4 +23,4 @@ COPY --from=build /app/dist/apps/x509/ ./dist/apps/x509/ COPY --from=build /app/libs/ ./libs/ COPY --from=build /app/node_modules ./node_modules USER nextjs -CMD ["node", "dist/apps/x509/main.js"] \ No newline at end of file +CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/x509/main.js"] From 378ea2a5706e5034c44f1808b5caa9b2d6dba83a Mon Sep 17 00:00:00 2001 From: "sahil.kamble@ayanworks.com" Date: Wed, 1 Apr 2026 12:48:45 +0530 Subject: [PATCH 3/6] fix: migration issue in Dockerfile Signed-off-by: sahil.kamble@ayanworks.com --- Dockerfiles/Dockerfile.agent-service | 6 +++--- Dockerfiles/Dockerfile.api-gateway | 6 +++--- Dockerfiles/Dockerfile.cloud-wallet | 6 +++--- Dockerfiles/Dockerfile.connection | 6 +++--- Dockerfiles/Dockerfile.ecosystem | 6 +++--- Dockerfiles/Dockerfile.geolocation | 6 +++--- Dockerfiles/Dockerfile.issuance | 6 +++--- Dockerfiles/Dockerfile.ledger | 6 +++--- Dockerfiles/Dockerfile.notification | 6 +++--- Dockerfiles/Dockerfile.oid4vc-issuance | 6 +++--- Dockerfiles/Dockerfile.oid4vc-verification | 6 +++--- Dockerfiles/Dockerfile.organization | 6 +++--- Dockerfiles/Dockerfile.user | 6 +++--- Dockerfiles/Dockerfile.utility | 6 +++--- Dockerfiles/Dockerfile.verification | 6 +++--- Dockerfiles/Dockerfile.webhook | 6 +++--- Dockerfiles/Dockerfile.x509 | 6 +++--- 17 files changed, 51 insertions(+), 51 deletions(-) diff --git a/Dockerfiles/Dockerfile.agent-service b/Dockerfiles/Dockerfile.agent-service index 986f5581f..8b0c73ff2 100644 --- a/Dockerfiles/Dockerfile.agent-service +++ b/Dockerfiles/Dockerfile.agent-service @@ -29,8 +29,8 @@ RUN apk update && apk upgrade && apk add --no-cache \ && addgroup -g 1001 -S nodejs \ && adduser -S nextjs -u 1001 WORKDIR /app -COPY --from=build /app/dist/apps/agent-service/ ./dist/apps/agent-service/ -COPY --from=build /app/libs/ ./libs/ -COPY --from=build /app/node_modules ./node_modules +COPY --from=build --chown=nextjs:nodejs /app/dist/apps/agent-service/ ./dist/apps/agent-service/ +COPY --from=build --chown=nextjs:nodejs /app/libs/ ./libs/ +COPY --from=build --chown=nextjs:nodejs /app/node_modules ./node_modules USER nextjs CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/agent-service/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.api-gateway b/Dockerfiles/Dockerfile.api-gateway index 04e230498..9c561b96f 100644 --- a/Dockerfiles/Dockerfile.api-gateway +++ b/Dockerfiles/Dockerfile.api-gateway @@ -19,8 +19,8 @@ RUN apk update && apk upgrade && apk add --no-cache openssl=3.3.6-r0 \ && addgroup -g 1001 -S nodejs \ && adduser -S nextjs -u 1001 WORKDIR /app -COPY --from=build /app/dist/apps/api-gateway/ ./dist/apps/api-gateway/ -COPY --from=build /app/libs/ ./libs/ -COPY --from=build /app/node_modules ./node_modules +COPY --from=build --chown=nextjs:nodejs /app/dist/apps/api-gateway/ ./dist/apps/api-gateway/ +COPY --from=build --chown=nextjs:nodejs /app/libs/ ./libs/ +COPY --from=build --chown=nextjs:nodejs /app/node_modules ./node_modules USER nextjs CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/api-gateway/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.cloud-wallet b/Dockerfiles/Dockerfile.cloud-wallet index 56c92372f..96adc2aa4 100644 --- a/Dockerfiles/Dockerfile.cloud-wallet +++ b/Dockerfiles/Dockerfile.cloud-wallet @@ -19,8 +19,8 @@ RUN apk update && apk upgrade && apk add --no-cache openssl=3.3.6-r0 \ && addgroup -g 1001 -S nodejs \ && adduser -S nextjs -u 1001 WORKDIR /app -COPY --from=build /app/dist/apps/cloud-wallet/ ./dist/apps/cloud-wallet/ -COPY --from=build /app/libs/ ./libs/ -COPY --from=build /app/node_modules ./node_modules +COPY --from=build --chown=nextjs:nodejs /app/dist/apps/cloud-wallet/ ./dist/apps/cloud-wallet/ +COPY --from=build --chown=nextjs:nodejs /app/libs/ ./libs/ +COPY --from=build --chown=nextjs:nodejs /app/node_modules ./node_modules USER nextjs CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/cloud-wallet/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.connection b/Dockerfiles/Dockerfile.connection index 47b883526..1afb281e3 100644 --- a/Dockerfiles/Dockerfile.connection +++ b/Dockerfiles/Dockerfile.connection @@ -19,8 +19,8 @@ RUN apk update && apk upgrade && apk add --no-cache openssl=3.3.6-r0 \ && addgroup -g 1001 -S nodejs \ && adduser -S nextjs -u 1001 WORKDIR /app -COPY --from=build /app/dist/apps/connection/ ./dist/apps/connection/ -COPY --from=build /app/libs/ ./libs/ -COPY --from=build /app/node_modules ./node_modules +COPY --from=build --chown=nextjs:nodejs /app/dist/apps/connection/ ./dist/apps/connection/ +COPY --from=build --chown=nextjs:nodejs /app/libs/ ./libs/ +COPY --from=build --chown=nextjs:nodejs /app/node_modules ./node_modules USER nextjs CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/connection/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.ecosystem b/Dockerfiles/Dockerfile.ecosystem index 8ad26fa77..29d8c6964 100644 --- a/Dockerfiles/Dockerfile.ecosystem +++ b/Dockerfiles/Dockerfile.ecosystem @@ -19,8 +19,8 @@ RUN apk update && apk upgrade && apk add --no-cache openssl=3.3.6-r0 \ && addgroup -g 1001 -S nodejs \ && adduser -S nextjs -u 1001 WORKDIR /app -COPY --from=build /app/dist/apps/ecosystem/ ./dist/apps/ecosystem/ -COPY --from=build /app/libs/ ./libs/ -COPY --from=build /app/node_modules ./node_modules +COPY --from=build --chown=nextjs:nodejs /app/dist/apps/ecosystem/ ./dist/apps/ecosystem/ +COPY --from=build --chown=nextjs:nodejs /app/libs/ ./libs/ +COPY --from=build --chown=nextjs:nodejs /app/node_modules ./node_modules USER nextjs CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/ecosystem/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.geolocation b/Dockerfiles/Dockerfile.geolocation index 52972f084..b18256b20 100644 --- a/Dockerfiles/Dockerfile.geolocation +++ b/Dockerfiles/Dockerfile.geolocation @@ -19,8 +19,8 @@ RUN apk update && apk upgrade && apk add --no-cache openssl=3.3.6-r0 \ && addgroup -g 1001 -S nodejs \ && adduser -S nextjs -u 1001 WORKDIR /app -COPY --from=build /app/dist/apps/geo-location/ ./dist/apps/geo-location/ -COPY --from=build /app/libs/ ./libs/ -COPY --from=build /app/node_modules ./node_modules +COPY --from=build --chown=nextjs:nodejs /app/dist/apps/geo-location/ ./dist/apps/geo-location/ +COPY --from=build --chown=nextjs:nodejs /app/libs/ ./libs/ +COPY --from=build --chown=nextjs:nodejs /app/node_modules ./node_modules USER nextjs CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/geo-location/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.issuance b/Dockerfiles/Dockerfile.issuance index b2fd32310..ab663fcf5 100644 --- a/Dockerfiles/Dockerfile.issuance +++ b/Dockerfiles/Dockerfile.issuance @@ -19,8 +19,8 @@ RUN apk update && apk upgrade && apk add --no-cache openssl=3.3.6-r0 \ && addgroup -g 1001 -S nodejs \ && adduser -S nextjs -u 1001 WORKDIR /app -COPY --from=build /app/dist/apps/issuance/ ./dist/apps/issuance/ -COPY --from=build /app/libs/ ./libs/ -COPY --from=build /app/node_modules ./node_modules +COPY --from=build --chown=nextjs:nodejs /app/dist/apps/issuance/ ./dist/apps/issuance/ +COPY --from=build --chown=nextjs:nodejs /app/libs/ ./libs/ +COPY --from=build --chown=nextjs:nodejs /app/node_modules ./node_modules USER nextjs CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/issuance/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.ledger b/Dockerfiles/Dockerfile.ledger index c9c5b62ff..9063cfc11 100644 --- a/Dockerfiles/Dockerfile.ledger +++ b/Dockerfiles/Dockerfile.ledger @@ -19,8 +19,8 @@ RUN apk update && apk upgrade && apk add --no-cache openssl=3.3.6-r0 \ && addgroup -g 1001 -S nodejs \ && adduser -S nextjs -u 1001 WORKDIR /app -COPY --from=build /app/dist/apps/ledger/ ./dist/apps/ledger/ -COPY --from=build /app/libs/ ./libs/ -COPY --from=build /app/node_modules ./node_modules +COPY --from=build --chown=nextjs:nodejs /app/dist/apps/ledger/ ./dist/apps/ledger/ +COPY --from=build --chown=nextjs:nodejs /app/libs/ ./libs/ +COPY --from=build --chown=nextjs:nodejs /app/node_modules ./node_modules USER nextjs CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/ledger/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.notification b/Dockerfiles/Dockerfile.notification index 0acdcdde8..62bf20321 100644 --- a/Dockerfiles/Dockerfile.notification +++ b/Dockerfiles/Dockerfile.notification @@ -18,8 +18,8 @@ RUN apk update && apk upgrade && apk add --no-cache openssl=3.3.6-r0 \ && addgroup -g 1001 -S nodejs \ && adduser -S nextjs -u 1001 WORKDIR /app -COPY --from=build /app/dist/apps/notification/ ./dist/apps/notification/ -COPY --from=build /app/libs/ ./libs/ -COPY --from=build /app/node_modules ./node_modules +COPY --from=build --chown=nextjs:nodejs /app/dist/apps/notification/ ./dist/apps/notification/ +COPY --from=build --chown=nextjs:nodejs /app/libs/ ./libs/ +COPY --from=build --chown=nextjs:nodejs /app/node_modules ./node_modules USER nextjs CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/notification/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.oid4vc-issuance b/Dockerfiles/Dockerfile.oid4vc-issuance index ebb4c00c0..fb2b83337 100644 --- a/Dockerfiles/Dockerfile.oid4vc-issuance +++ b/Dockerfiles/Dockerfile.oid4vc-issuance @@ -18,8 +18,8 @@ RUN apk update && apk upgrade && apk add --no-cache openssl=3.3.6-r0 \ && addgroup -g 1001 -S nodejs \ && adduser -S nextjs -u 1001 WORKDIR /app -COPY --from=build /app/dist/apps/oid4vc-issuance/ ./dist/apps/oid4vc-issuance/ -COPY --from=build /app/libs/ ./libs/ -COPY --from=build /app/node_modules ./node_modules +COPY --from=build --chown=nextjs:nodejs /app/dist/apps/oid4vc-issuance/ ./dist/apps/oid4vc-issuance/ +COPY --from=build --chown=nextjs:nodejs /app/libs/ ./libs/ +COPY --from=build --chown=nextjs:nodejs /app/node_modules ./node_modules USER nextjs CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/oid4vc-issuance/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.oid4vc-verification b/Dockerfiles/Dockerfile.oid4vc-verification index 592d5c2b0..74125c755 100644 --- a/Dockerfiles/Dockerfile.oid4vc-verification +++ b/Dockerfiles/Dockerfile.oid4vc-verification @@ -19,8 +19,8 @@ RUN apk update && apk upgrade && apk add --no-cache openssl=3.3.6-r0 \ && addgroup -g 1001 -S nodejs \ && adduser -S nextjs -u 1001 WORKDIR /app -COPY --from=build /app/dist/apps/oid4vc-verification/ ./dist/apps/oid4vc-verification/ -COPY --from=build /app/libs/ ./libs/ -COPY --from=build /app/node_modules ./node_modules +COPY --from=build --chown=nextjs:nodejs /app/dist/apps/oid4vc-verification/ ./dist/apps/oid4vc-verification/ +COPY --from=build --chown=nextjs:nodejs /app/libs/ ./libs/ +COPY --from=build --chown=nextjs:nodejs /app/node_modules ./node_modules USER nextjs CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/oid4vc-verification/main.js"] diff --git a/Dockerfiles/Dockerfile.organization b/Dockerfiles/Dockerfile.organization index 9ba993330..b51a982d5 100644 --- a/Dockerfiles/Dockerfile.organization +++ b/Dockerfiles/Dockerfile.organization @@ -19,8 +19,8 @@ RUN apk update && apk upgrade && apk add --no-cache openssl=3.3.6-r0 \ && addgroup -g 1001 -S nodejs \ && adduser -S nextjs -u 1001 WORKDIR /app -COPY --from=build /app/dist/apps/organization/ ./dist/apps/organization/ -COPY --from=build /app/libs/ ./libs/ -COPY --from=build /app/node_modules ./node_modules +COPY --from=build --chown=nextjs:nodejs /app/dist/apps/organization/ ./dist/apps/organization/ +COPY --from=build --chown=nextjs:nodejs /app/libs/ ./libs/ +COPY --from=build --chown=nextjs:nodejs /app/node_modules ./node_modules USER nextjs CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/organization/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.user b/Dockerfiles/Dockerfile.user index 2ae42e3c5..cba64ff8c 100644 --- a/Dockerfiles/Dockerfile.user +++ b/Dockerfiles/Dockerfile.user @@ -19,8 +19,8 @@ RUN apk update && apk upgrade && apk add --no-cache openssl=3.3.6-r0 \ && addgroup -g 1001 -S nodejs \ && adduser -S nextjs -u 1001 WORKDIR /app -COPY --from=build /app/dist/apps/user/ ./dist/apps/user/ -COPY --from=build /app/libs/ ./libs/ -COPY --from=build /app/node_modules ./node_modules +COPY --from=build --chown=nextjs:nodejs /app/dist/apps/user/ ./dist/apps/user/ +COPY --from=build --chown=nextjs:nodejs /app/libs/ ./libs/ +COPY --from=build --chown=nextjs:nodejs /app/node_modules ./node_modules USER nextjs CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/user/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.utility b/Dockerfiles/Dockerfile.utility index b9892c5a3..a7ed0e5f3 100644 --- a/Dockerfiles/Dockerfile.utility +++ b/Dockerfiles/Dockerfile.utility @@ -19,8 +19,8 @@ RUN apk update && apk upgrade && apk add --no-cache openssl=3.3.6-r0 \ && addgroup -g 1001 -S nodejs \ && adduser -S nextjs -u 1001 WORKDIR /app -COPY --from=build /app/dist/apps/utility/ ./dist/apps/utility/ -COPY --from=build /app/libs/ ./libs/ -COPY --from=build /app/node_modules ./node_modules +COPY --from=build --chown=nextjs:nodejs /app/dist/apps/utility/ ./dist/apps/utility/ +COPY --from=build --chown=nextjs:nodejs /app/libs/ ./libs/ +COPY --from=build --chown=nextjs:nodejs /app/node_modules ./node_modules USER nextjs CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/utility/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.verification b/Dockerfiles/Dockerfile.verification index 0b8b9af4a..3b27c944f 100644 --- a/Dockerfiles/Dockerfile.verification +++ b/Dockerfiles/Dockerfile.verification @@ -19,8 +19,8 @@ RUN apk update && apk upgrade && apk add --no-cache openssl=3.3.6-r0 \ && addgroup -g 1001 -S nodejs \ && adduser -S nextjs -u 1001 WORKDIR /app -COPY --from=build /app/dist/apps/verification/ ./dist/apps/verification/ -COPY --from=build /app/libs/ ./libs/ -COPY --from=build /app/node_modules ./node_modules +COPY --from=build --chown=nextjs:nodejs /app/dist/apps/verification/ ./dist/apps/verification/ +COPY --from=build --chown=nextjs:nodejs /app/libs/ ./libs/ +COPY --from=build --chown=nextjs:nodejs /app/node_modules ./node_modules USER nextjs CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/verification/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.webhook b/Dockerfiles/Dockerfile.webhook index c89e75963..686810340 100644 --- a/Dockerfiles/Dockerfile.webhook +++ b/Dockerfiles/Dockerfile.webhook @@ -19,8 +19,8 @@ RUN apk update && apk upgrade && apk add --no-cache openssl=3.3.6-r0 \ && addgroup -g 1001 -S nodejs \ && adduser -S nextjs -u 1001 WORKDIR /app -COPY --from=build /app/dist/apps/webhook/ ./dist/apps/webhook/ -COPY --from=build /app/libs/ ./libs/ -COPY --from=build /app/node_modules ./node_modules +COPY --from=build --chown=nextjs:nodejs /app/dist/apps/webhook/ ./dist/apps/webhook/ +COPY --from=build --chown=nextjs:nodejs /app/libs/ ./libs/ +COPY --from=build --chown=nextjs:nodejs /app/node_modules ./node_modules USER nextjs CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/webhook/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.x509 b/Dockerfiles/Dockerfile.x509 index 77b2a7630..e7c70feb3 100644 --- a/Dockerfiles/Dockerfile.x509 +++ b/Dockerfiles/Dockerfile.x509 @@ -19,8 +19,8 @@ RUN apk update && apk upgrade && apk add --no-cache openssl=3.3.6-r0 \ && addgroup -g 1001 -S nodejs \ && adduser -S nextjs -u 1001 WORKDIR /app -COPY --from=build /app/dist/apps/x509/ ./dist/apps/x509/ -COPY --from=build /app/libs/ ./libs/ -COPY --from=build /app/node_modules ./node_modules +COPY --from=build --chown=nextjs:nodejs /app/dist/apps/x509/ ./dist/apps/x509/ +COPY --from=build --chown=nextjs:nodejs /app/libs/ ./libs/ +COPY --from=build --chown=nextjs:nodejs /app/node_modules ./node_modules USER nextjs CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/x509/main.js"] From 29a4749d7b0cfa578fc6628cfe6a2369c892c811 Mon Sep 17 00:00:00 2001 From: "sahil.kamble@ayanworks.com" Date: Wed, 1 Apr 2026 16:22:49 +0530 Subject: [PATCH 4/6] fix: migration issue give write access to only prisma folder Signed-off-by: sahil.kamble@ayanworks.com --- Dockerfiles/Dockerfile.agent-service | 7 ++-- Dockerfiles/Dockerfile.api-gateway | 7 ++-- Dockerfiles/Dockerfile.cloud-wallet | 7 ++-- Dockerfiles/Dockerfile.connection | 7 ++-- Dockerfiles/Dockerfile.ecosystem | 7 ++-- Dockerfiles/Dockerfile.geolocation | 7 ++-- Dockerfiles/Dockerfile.issuance | 7 ++-- Dockerfiles/Dockerfile.ledger | 7 ++-- Dockerfiles/Dockerfile.notification | 7 ++-- Dockerfiles/Dockerfile.oid4vc-issuance | 7 ++-- Dockerfiles/Dockerfile.oid4vc-verification | 7 ++-- Dockerfiles/Dockerfile.organization | 7 ++-- Dockerfiles/Dockerfile.user | 7 ++-- Dockerfiles/Dockerfile.utility | 7 ++-- Dockerfiles/Dockerfile.verification | 7 ++-- Dockerfiles/Dockerfile.webhook | 7 ++-- Dockerfiles/Dockerfile.x509 | 7 ++-- docker-compose-dev.yml | 39 ++++++++++++++++++++-- 18 files changed, 104 insertions(+), 54 deletions(-) diff --git a/Dockerfiles/Dockerfile.agent-service b/Dockerfiles/Dockerfile.agent-service index 8b0c73ff2..8636574f7 100644 --- a/Dockerfiles/Dockerfile.agent-service +++ b/Dockerfiles/Dockerfile.agent-service @@ -29,8 +29,9 @@ RUN apk update && apk upgrade && apk add --no-cache \ && addgroup -g 1001 -S nodejs \ && adduser -S nextjs -u 1001 WORKDIR /app -COPY --from=build --chown=nextjs:nodejs /app/dist/apps/agent-service/ ./dist/apps/agent-service/ -COPY --from=build --chown=nextjs:nodejs /app/libs/ ./libs/ -COPY --from=build --chown=nextjs:nodejs /app/node_modules ./node_modules +COPY --from=build /app/dist/apps/agent-service/ ./dist/apps/agent-service/ +COPY --from=build /app/libs/ ./libs/ +COPY --from=build /app/node_modules ./node_modules +RUN find ./node_modules -type d -name ".prisma" -exec chown -R nextjs:nodejs {} + USER nextjs CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/agent-service/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.api-gateway b/Dockerfiles/Dockerfile.api-gateway index 9c561b96f..b1838ba3c 100644 --- a/Dockerfiles/Dockerfile.api-gateway +++ b/Dockerfiles/Dockerfile.api-gateway @@ -19,8 +19,9 @@ RUN apk update && apk upgrade && apk add --no-cache openssl=3.3.6-r0 \ && addgroup -g 1001 -S nodejs \ && adduser -S nextjs -u 1001 WORKDIR /app -COPY --from=build --chown=nextjs:nodejs /app/dist/apps/api-gateway/ ./dist/apps/api-gateway/ -COPY --from=build --chown=nextjs:nodejs /app/libs/ ./libs/ -COPY --from=build --chown=nextjs:nodejs /app/node_modules ./node_modules +COPY --from=build /app/dist/apps/api-gateway/ ./dist/apps/api-gateway/ +COPY --from=build /app/libs/ ./libs/ +COPY --from=build /app/node_modules ./node_modules +RUN find ./node_modules -type d -name ".prisma" -exec chown -R nextjs:nodejs {} + USER nextjs CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/api-gateway/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.cloud-wallet b/Dockerfiles/Dockerfile.cloud-wallet index 96adc2aa4..1acae52cf 100644 --- a/Dockerfiles/Dockerfile.cloud-wallet +++ b/Dockerfiles/Dockerfile.cloud-wallet @@ -19,8 +19,9 @@ RUN apk update && apk upgrade && apk add --no-cache openssl=3.3.6-r0 \ && addgroup -g 1001 -S nodejs \ && adduser -S nextjs -u 1001 WORKDIR /app -COPY --from=build --chown=nextjs:nodejs /app/dist/apps/cloud-wallet/ ./dist/apps/cloud-wallet/ -COPY --from=build --chown=nextjs:nodejs /app/libs/ ./libs/ -COPY --from=build --chown=nextjs:nodejs /app/node_modules ./node_modules +COPY --from=build /app/dist/apps/cloud-wallet/ ./dist/apps/cloud-wallet/ +COPY --from=build /app/libs/ ./libs/ +COPY --from=build /app/node_modules ./node_modules +RUN find ./node_modules -type d -name ".prisma" -exec chown -R nextjs:nodejs {} + USER nextjs CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/cloud-wallet/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.connection b/Dockerfiles/Dockerfile.connection index 1afb281e3..acf90f05f 100644 --- a/Dockerfiles/Dockerfile.connection +++ b/Dockerfiles/Dockerfile.connection @@ -19,8 +19,9 @@ RUN apk update && apk upgrade && apk add --no-cache openssl=3.3.6-r0 \ && addgroup -g 1001 -S nodejs \ && adduser -S nextjs -u 1001 WORKDIR /app -COPY --from=build --chown=nextjs:nodejs /app/dist/apps/connection/ ./dist/apps/connection/ -COPY --from=build --chown=nextjs:nodejs /app/libs/ ./libs/ -COPY --from=build --chown=nextjs:nodejs /app/node_modules ./node_modules +COPY --from=build /app/dist/apps/connection/ ./dist/apps/connection/ +COPY --from=build /app/libs/ ./libs/ +COPY --from=build /app/node_modules ./node_modules +RUN find ./node_modules -type d -name ".prisma" -exec chown -R nextjs:nodejs {} + USER nextjs CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/connection/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.ecosystem b/Dockerfiles/Dockerfile.ecosystem index 29d8c6964..cda567084 100644 --- a/Dockerfiles/Dockerfile.ecosystem +++ b/Dockerfiles/Dockerfile.ecosystem @@ -19,8 +19,9 @@ RUN apk update && apk upgrade && apk add --no-cache openssl=3.3.6-r0 \ && addgroup -g 1001 -S nodejs \ && adduser -S nextjs -u 1001 WORKDIR /app -COPY --from=build --chown=nextjs:nodejs /app/dist/apps/ecosystem/ ./dist/apps/ecosystem/ -COPY --from=build --chown=nextjs:nodejs /app/libs/ ./libs/ -COPY --from=build --chown=nextjs:nodejs /app/node_modules ./node_modules +COPY --from=build /app/dist/apps/ecosystem/ ./dist/apps/ecosystem/ +COPY --from=build /app/libs/ ./libs/ +COPY --from=build /app/node_modules ./node_modules +RUN find ./node_modules -type d -name ".prisma" -exec chown -R nextjs:nodejs {} + USER nextjs CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/ecosystem/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.geolocation b/Dockerfiles/Dockerfile.geolocation index b18256b20..85052fd1a 100644 --- a/Dockerfiles/Dockerfile.geolocation +++ b/Dockerfiles/Dockerfile.geolocation @@ -19,8 +19,9 @@ RUN apk update && apk upgrade && apk add --no-cache openssl=3.3.6-r0 \ && addgroup -g 1001 -S nodejs \ && adduser -S nextjs -u 1001 WORKDIR /app -COPY --from=build --chown=nextjs:nodejs /app/dist/apps/geo-location/ ./dist/apps/geo-location/ -COPY --from=build --chown=nextjs:nodejs /app/libs/ ./libs/ -COPY --from=build --chown=nextjs:nodejs /app/node_modules ./node_modules +COPY --from=build /app/dist/apps/geo-location/ ./dist/apps/geo-location/ +COPY --from=build /app/libs/ ./libs/ +COPY --from=build /app/node_modules ./node_modules +RUN find ./node_modules -type d -name ".prisma" -exec chown -R nextjs:nodejs {} + USER nextjs CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/geo-location/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.issuance b/Dockerfiles/Dockerfile.issuance index ab663fcf5..9f66e3d6a 100644 --- a/Dockerfiles/Dockerfile.issuance +++ b/Dockerfiles/Dockerfile.issuance @@ -19,8 +19,9 @@ RUN apk update && apk upgrade && apk add --no-cache openssl=3.3.6-r0 \ && addgroup -g 1001 -S nodejs \ && adduser -S nextjs -u 1001 WORKDIR /app -COPY --from=build --chown=nextjs:nodejs /app/dist/apps/issuance/ ./dist/apps/issuance/ -COPY --from=build --chown=nextjs:nodejs /app/libs/ ./libs/ -COPY --from=build --chown=nextjs:nodejs /app/node_modules ./node_modules +COPY --from=build /app/dist/apps/issuance/ ./dist/apps/issuance/ +COPY --from=build /app/libs/ ./libs/ +COPY --from=build /app/node_modules ./node_modules +RUN find ./node_modules -type d -name ".prisma" -exec chown -R nextjs:nodejs {} + USER nextjs CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/issuance/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.ledger b/Dockerfiles/Dockerfile.ledger index 9063cfc11..9d116ffc7 100644 --- a/Dockerfiles/Dockerfile.ledger +++ b/Dockerfiles/Dockerfile.ledger @@ -19,8 +19,9 @@ RUN apk update && apk upgrade && apk add --no-cache openssl=3.3.6-r0 \ && addgroup -g 1001 -S nodejs \ && adduser -S nextjs -u 1001 WORKDIR /app -COPY --from=build --chown=nextjs:nodejs /app/dist/apps/ledger/ ./dist/apps/ledger/ -COPY --from=build --chown=nextjs:nodejs /app/libs/ ./libs/ -COPY --from=build --chown=nextjs:nodejs /app/node_modules ./node_modules +COPY --from=build /app/dist/apps/ledger/ ./dist/apps/ledger/ +COPY --from=build /app/libs/ ./libs/ +COPY --from=build /app/node_modules ./node_modules +RUN find ./node_modules -type d -name ".prisma" -exec chown -R nextjs:nodejs {} + USER nextjs CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/ledger/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.notification b/Dockerfiles/Dockerfile.notification index 62bf20321..4579bc4d3 100644 --- a/Dockerfiles/Dockerfile.notification +++ b/Dockerfiles/Dockerfile.notification @@ -18,8 +18,9 @@ RUN apk update && apk upgrade && apk add --no-cache openssl=3.3.6-r0 \ && addgroup -g 1001 -S nodejs \ && adduser -S nextjs -u 1001 WORKDIR /app -COPY --from=build --chown=nextjs:nodejs /app/dist/apps/notification/ ./dist/apps/notification/ -COPY --from=build --chown=nextjs:nodejs /app/libs/ ./libs/ -COPY --from=build --chown=nextjs:nodejs /app/node_modules ./node_modules +COPY --from=build /app/dist/apps/notification/ ./dist/apps/notification/ +COPY --from=build /app/libs/ ./libs/ +COPY --from=build /app/node_modules ./node_modules +RUN find ./node_modules -type d -name ".prisma" -exec chown -R nextjs:nodejs {} + USER nextjs CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/notification/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.oid4vc-issuance b/Dockerfiles/Dockerfile.oid4vc-issuance index fb2b83337..163508d00 100644 --- a/Dockerfiles/Dockerfile.oid4vc-issuance +++ b/Dockerfiles/Dockerfile.oid4vc-issuance @@ -18,8 +18,9 @@ RUN apk update && apk upgrade && apk add --no-cache openssl=3.3.6-r0 \ && addgroup -g 1001 -S nodejs \ && adduser -S nextjs -u 1001 WORKDIR /app -COPY --from=build --chown=nextjs:nodejs /app/dist/apps/oid4vc-issuance/ ./dist/apps/oid4vc-issuance/ -COPY --from=build --chown=nextjs:nodejs /app/libs/ ./libs/ -COPY --from=build --chown=nextjs:nodejs /app/node_modules ./node_modules +COPY --from=build /app/dist/apps/oid4vc-issuance/ ./dist/apps/oid4vc-issuance/ +COPY --from=build /app/libs/ ./libs/ +COPY --from=build /app/node_modules ./node_modules +RUN find ./node_modules -type d -name ".prisma" -exec chown -R nextjs:nodejs {} + USER nextjs CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/oid4vc-issuance/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.oid4vc-verification b/Dockerfiles/Dockerfile.oid4vc-verification index 74125c755..05cfdfaa2 100644 --- a/Dockerfiles/Dockerfile.oid4vc-verification +++ b/Dockerfiles/Dockerfile.oid4vc-verification @@ -19,8 +19,9 @@ RUN apk update && apk upgrade && apk add --no-cache openssl=3.3.6-r0 \ && addgroup -g 1001 -S nodejs \ && adduser -S nextjs -u 1001 WORKDIR /app -COPY --from=build --chown=nextjs:nodejs /app/dist/apps/oid4vc-verification/ ./dist/apps/oid4vc-verification/ -COPY --from=build --chown=nextjs:nodejs /app/libs/ ./libs/ -COPY --from=build --chown=nextjs:nodejs /app/node_modules ./node_modules +COPY --from=build /app/dist/apps/oid4vc-verification/ ./dist/apps/oid4vc-verification/ +COPY --from=build /app/libs/ ./libs/ +COPY --from=build /app/node_modules ./node_modules +RUN find ./node_modules -type d -name ".prisma" -exec chown -R nextjs:nodejs {} + USER nextjs CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/oid4vc-verification/main.js"] diff --git a/Dockerfiles/Dockerfile.organization b/Dockerfiles/Dockerfile.organization index b51a982d5..7e77771c8 100644 --- a/Dockerfiles/Dockerfile.organization +++ b/Dockerfiles/Dockerfile.organization @@ -19,8 +19,9 @@ RUN apk update && apk upgrade && apk add --no-cache openssl=3.3.6-r0 \ && addgroup -g 1001 -S nodejs \ && adduser -S nextjs -u 1001 WORKDIR /app -COPY --from=build --chown=nextjs:nodejs /app/dist/apps/organization/ ./dist/apps/organization/ -COPY --from=build --chown=nextjs:nodejs /app/libs/ ./libs/ -COPY --from=build --chown=nextjs:nodejs /app/node_modules ./node_modules +COPY --from=build /app/dist/apps/organization/ ./dist/apps/organization/ +COPY --from=build /app/libs/ ./libs/ +COPY --from=build /app/node_modules ./node_modules +RUN find ./node_modules -type d -name ".prisma" -exec chown -R nextjs:nodejs {} + USER nextjs CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/organization/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.user b/Dockerfiles/Dockerfile.user index cba64ff8c..251d3579f 100644 --- a/Dockerfiles/Dockerfile.user +++ b/Dockerfiles/Dockerfile.user @@ -19,8 +19,9 @@ RUN apk update && apk upgrade && apk add --no-cache openssl=3.3.6-r0 \ && addgroup -g 1001 -S nodejs \ && adduser -S nextjs -u 1001 WORKDIR /app -COPY --from=build --chown=nextjs:nodejs /app/dist/apps/user/ ./dist/apps/user/ -COPY --from=build --chown=nextjs:nodejs /app/libs/ ./libs/ -COPY --from=build --chown=nextjs:nodejs /app/node_modules ./node_modules +COPY --from=build /app/dist/apps/user/ ./dist/apps/user/ +COPY --from=build /app/libs/ ./libs/ +COPY --from=build /app/node_modules ./node_modules +RUN find ./node_modules -type d -name ".prisma" -exec chown -R nextjs:nodejs {} + USER nextjs CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/user/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.utility b/Dockerfiles/Dockerfile.utility index a7ed0e5f3..05d00d125 100644 --- a/Dockerfiles/Dockerfile.utility +++ b/Dockerfiles/Dockerfile.utility @@ -19,8 +19,9 @@ RUN apk update && apk upgrade && apk add --no-cache openssl=3.3.6-r0 \ && addgroup -g 1001 -S nodejs \ && adduser -S nextjs -u 1001 WORKDIR /app -COPY --from=build --chown=nextjs:nodejs /app/dist/apps/utility/ ./dist/apps/utility/ -COPY --from=build --chown=nextjs:nodejs /app/libs/ ./libs/ -COPY --from=build --chown=nextjs:nodejs /app/node_modules ./node_modules +COPY --from=build /app/dist/apps/utility/ ./dist/apps/utility/ +COPY --from=build /app/libs/ ./libs/ +COPY --from=build /app/node_modules ./node_modules +RUN find ./node_modules -type d -name ".prisma" -exec chown -R nextjs:nodejs {} + USER nextjs CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/utility/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.verification b/Dockerfiles/Dockerfile.verification index 3b27c944f..d913eb1be 100644 --- a/Dockerfiles/Dockerfile.verification +++ b/Dockerfiles/Dockerfile.verification @@ -19,8 +19,9 @@ RUN apk update && apk upgrade && apk add --no-cache openssl=3.3.6-r0 \ && addgroup -g 1001 -S nodejs \ && adduser -S nextjs -u 1001 WORKDIR /app -COPY --from=build --chown=nextjs:nodejs /app/dist/apps/verification/ ./dist/apps/verification/ -COPY --from=build --chown=nextjs:nodejs /app/libs/ ./libs/ -COPY --from=build --chown=nextjs:nodejs /app/node_modules ./node_modules +COPY --from=build /app/dist/apps/verification/ ./dist/apps/verification/ +COPY --from=build /app/libs/ ./libs/ +COPY --from=build /app/node_modules ./node_modules +RUN find ./node_modules -type d -name ".prisma" -exec chown -R nextjs:nodejs {} + USER nextjs CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/verification/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.webhook b/Dockerfiles/Dockerfile.webhook index 686810340..a5bbdc3eb 100644 --- a/Dockerfiles/Dockerfile.webhook +++ b/Dockerfiles/Dockerfile.webhook @@ -19,8 +19,9 @@ RUN apk update && apk upgrade && apk add --no-cache openssl=3.3.6-r0 \ && addgroup -g 1001 -S nodejs \ && adduser -S nextjs -u 1001 WORKDIR /app -COPY --from=build --chown=nextjs:nodejs /app/dist/apps/webhook/ ./dist/apps/webhook/ -COPY --from=build --chown=nextjs:nodejs /app/libs/ ./libs/ -COPY --from=build --chown=nextjs:nodejs /app/node_modules ./node_modules +COPY --from=build /app/dist/apps/webhook/ ./dist/apps/webhook/ +COPY --from=build /app/libs/ ./libs/ +COPY --from=build /app/node_modules ./node_modules +RUN find ./node_modules -type d -name ".prisma" -exec chown -R nextjs:nodejs {} + USER nextjs CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/webhook/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.x509 b/Dockerfiles/Dockerfile.x509 index e7c70feb3..e71397c3d 100644 --- a/Dockerfiles/Dockerfile.x509 +++ b/Dockerfiles/Dockerfile.x509 @@ -19,8 +19,9 @@ RUN apk update && apk upgrade && apk add --no-cache openssl=3.3.6-r0 \ && addgroup -g 1001 -S nodejs \ && adduser -S nextjs -u 1001 WORKDIR /app -COPY --from=build --chown=nextjs:nodejs /app/dist/apps/x509/ ./dist/apps/x509/ -COPY --from=build --chown=nextjs:nodejs /app/libs/ ./libs/ -COPY --from=build --chown=nextjs:nodejs /app/node_modules ./node_modules +COPY --from=build /app/dist/apps/x509/ ./dist/apps/x509/ +COPY --from=build /app/libs/ ./libs/ +COPY --from=build /app/node_modules ./node_modules +RUN find ./node_modules -type d -name ".prisma" -exec chown -R nextjs:nodejs {} + USER nextjs CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/x509/main.js"] diff --git a/docker-compose-dev.yml b/docker-compose-dev.yml index 66bcbbd61..bf3dc893e 100644 --- a/docker-compose-dev.yml +++ b/docker-compose-dev.yml @@ -191,9 +191,42 @@ services: dockerfile: Dockerfiles/Dockerfile.webhook env_file: - ./.env - - - + ecosystem: + depends_on: + - nats + - api-gateway + build: + context: ./ # Adjust the context path as needed + dockerfile: Dockerfiles/Dockerfile.ecosystem + env_file: + - ./.env + oid4vc-issuance: + depends_on: + - nats + - api-gateway + build: + context: ./ # Adjust the context path as needed + dockerfile: Dockerfiles/Dockerfile.oid4vc-issuance + env_file: + - ./.env + oid4vc-verification: + depends_on: + - nats + - api-gateway + build: + context: ./ # Adjust the context path as needed + dockerfile: Dockerfiles/Dockerfile.oid4vc-verification + env_file: + - ./.env + x509: + depends_on: + - nats + - api-gateway + build: + context: ./ # Adjust the context path as needed + dockerfile: Dockerfiles/Dockerfile.x509 + env_file: + - ./.env volumes: cache: From 0e751835f4b7e4e76ddd3947cf83dab33f97de66 Mon Sep 17 00:00:00 2001 From: "sahil.kamble@ayanworks.com" Date: Wed, 1 Apr 2026 18:06:28 +0530 Subject: [PATCH 5/6] fix: migration issue in Dockerfile remove prisma generate from CMD Signed-off-by: sahil.kamble@ayanworks.com --- Dockerfiles/Dockerfile.agent-service | 3 +-- Dockerfiles/Dockerfile.api-gateway | 3 +-- Dockerfiles/Dockerfile.cloud-wallet | 3 +-- Dockerfiles/Dockerfile.connection | 5 ++--- Dockerfiles/Dockerfile.ecosystem | 5 ++--- Dockerfiles/Dockerfile.geolocation | 5 ++--- Dockerfiles/Dockerfile.issuance | 5 ++--- Dockerfiles/Dockerfile.ledger | 5 ++--- Dockerfiles/Dockerfile.notification | 3 +-- Dockerfiles/Dockerfile.oid4vc-issuance | 3 +-- Dockerfiles/Dockerfile.oid4vc-verification | 5 ++--- Dockerfiles/Dockerfile.organization | 5 ++--- Dockerfiles/Dockerfile.user | 5 ++--- Dockerfiles/Dockerfile.utility | 5 ++--- Dockerfiles/Dockerfile.verification | 5 ++--- Dockerfiles/Dockerfile.webhook | 5 ++--- Dockerfiles/Dockerfile.x509 | 5 ++--- docker-compose-dev.yml | 2 ++ docker-compose.yml | 2 ++ 19 files changed, 33 insertions(+), 46 deletions(-) diff --git a/Dockerfiles/Dockerfile.agent-service b/Dockerfiles/Dockerfile.agent-service index 8636574f7..41de1cb78 100644 --- a/Dockerfiles/Dockerfile.agent-service +++ b/Dockerfiles/Dockerfile.agent-service @@ -32,6 +32,5 @@ WORKDIR /app COPY --from=build /app/dist/apps/agent-service/ ./dist/apps/agent-service/ COPY --from=build /app/libs/ ./libs/ COPY --from=build /app/node_modules ./node_modules -RUN find ./node_modules -type d -name ".prisma" -exec chown -R nextjs:nodejs {} + USER nextjs -CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/agent-service/main.js"] \ No newline at end of file +CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deployy && cd ../.. && node dist/apps/agent-service/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.api-gateway b/Dockerfiles/Dockerfile.api-gateway index b1838ba3c..f8db64548 100644 --- a/Dockerfiles/Dockerfile.api-gateway +++ b/Dockerfiles/Dockerfile.api-gateway @@ -22,6 +22,5 @@ WORKDIR /app COPY --from=build /app/dist/apps/api-gateway/ ./dist/apps/api-gateway/ COPY --from=build /app/libs/ ./libs/ COPY --from=build /app/node_modules ./node_modules -RUN find ./node_modules -type d -name ".prisma" -exec chown -R nextjs:nodejs {} + USER nextjs -CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/api-gateway/main.js"] \ No newline at end of file +CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && cd ../.. && node dist/apps/api-gateway/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.cloud-wallet b/Dockerfiles/Dockerfile.cloud-wallet index 1acae52cf..1299b9b7b 100644 --- a/Dockerfiles/Dockerfile.cloud-wallet +++ b/Dockerfiles/Dockerfile.cloud-wallet @@ -22,6 +22,5 @@ WORKDIR /app COPY --from=build /app/dist/apps/cloud-wallet/ ./dist/apps/cloud-wallet/ COPY --from=build /app/libs/ ./libs/ COPY --from=build /app/node_modules ./node_modules -RUN find ./node_modules -type d -name ".prisma" -exec chown -R nextjs:nodejs {} + USER nextjs -CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/cloud-wallet/main.js"] \ No newline at end of file +CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && cd ../.. && node dist/apps/cloud-wallet/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.connection b/Dockerfiles/Dockerfile.connection index acf90f05f..799c1f5bc 100644 --- a/Dockerfiles/Dockerfile.connection +++ b/Dockerfiles/Dockerfile.connection @@ -1,7 +1,7 @@ # Stage 1: Build the application FROM node:24-alpine3.21 AS build RUN apk update && apk upgrade && apk add --no-cache openssl=3.3.6-r0 \ - && rm -rf /var/cache/apk/* + && rm -rf /var/cache/apk/* RUN npm install -g pnpm@9.15.3 --ignore-scripts WORKDIR /app COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./ @@ -22,6 +22,5 @@ WORKDIR /app COPY --from=build /app/dist/apps/connection/ ./dist/apps/connection/ COPY --from=build /app/libs/ ./libs/ COPY --from=build /app/node_modules ./node_modules -RUN find ./node_modules -type d -name ".prisma" -exec chown -R nextjs:nodejs {} + USER nextjs -CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/connection/main.js"] \ No newline at end of file +CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && cd ../.. && node dist/apps/connection/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.ecosystem b/Dockerfiles/Dockerfile.ecosystem index cda567084..dad9a00c9 100644 --- a/Dockerfiles/Dockerfile.ecosystem +++ b/Dockerfiles/Dockerfile.ecosystem @@ -1,7 +1,7 @@ # Stage 1: Build the application FROM node:24-alpine3.21 AS build RUN apk update && apk upgrade && apk add --no-cache openssl=3.3.6-r0 \ - && rm -rf /var/cache/apk/* + && rm -rf /var/cache/apk/* RUN npm install -g pnpm@9.15.3 --ignore-scripts WORKDIR /app COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./ @@ -22,6 +22,5 @@ WORKDIR /app COPY --from=build /app/dist/apps/ecosystem/ ./dist/apps/ecosystem/ COPY --from=build /app/libs/ ./libs/ COPY --from=build /app/node_modules ./node_modules -RUN find ./node_modules -type d -name ".prisma" -exec chown -R nextjs:nodejs {} + USER nextjs -CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/ecosystem/main.js"] \ No newline at end of file +CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && cd ../.. && node dist/apps/ecosystem/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.geolocation b/Dockerfiles/Dockerfile.geolocation index 85052fd1a..8d9cedcad 100644 --- a/Dockerfiles/Dockerfile.geolocation +++ b/Dockerfiles/Dockerfile.geolocation @@ -1,7 +1,7 @@ # Stage 1: Build the application FROM node:24-alpine3.21 AS build RUN apk update && apk upgrade && apk add --no-cache openssl=3.3.6-r0 \ - && rm -rf /var/cache/apk/* + && rm -rf /var/cache/apk/* RUN npm install -g pnpm@9.15.3 --ignore-scripts WORKDIR /app COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./ @@ -22,6 +22,5 @@ WORKDIR /app COPY --from=build /app/dist/apps/geo-location/ ./dist/apps/geo-location/ COPY --from=build /app/libs/ ./libs/ COPY --from=build /app/node_modules ./node_modules -RUN find ./node_modules -type d -name ".prisma" -exec chown -R nextjs:nodejs {} + USER nextjs -CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/geo-location/main.js"] \ No newline at end of file +CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && cd ../.. && node dist/apps/geo-location/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.issuance b/Dockerfiles/Dockerfile.issuance index 9f66e3d6a..d210754a8 100644 --- a/Dockerfiles/Dockerfile.issuance +++ b/Dockerfiles/Dockerfile.issuance @@ -1,7 +1,7 @@ # Stage 1: Build the application FROM node:24-alpine3.21 AS build RUN apk update && apk upgrade && apk add --no-cache openssl=3.3.6-r0 \ - && rm -rf /var/cache/apk/* + && rm -rf /var/cache/apk/* RUN npm install -g pnpm@9.15.3 --ignore-scripts WORKDIR /app COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./ @@ -22,6 +22,5 @@ WORKDIR /app COPY --from=build /app/dist/apps/issuance/ ./dist/apps/issuance/ COPY --from=build /app/libs/ ./libs/ COPY --from=build /app/node_modules ./node_modules -RUN find ./node_modules -type d -name ".prisma" -exec chown -R nextjs:nodejs {} + USER nextjs -CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/issuance/main.js"] \ No newline at end of file +CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && cd ../.. && node dist/apps/issuance/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.ledger b/Dockerfiles/Dockerfile.ledger index 9d116ffc7..6dba6c192 100644 --- a/Dockerfiles/Dockerfile.ledger +++ b/Dockerfiles/Dockerfile.ledger @@ -1,7 +1,7 @@ # Stage 1: Build the application FROM node:24-alpine3.21 AS build RUN apk update && apk upgrade && apk add --no-cache openssl=3.3.6-r0 \ - && rm -rf /var/cache/apk/* + && rm -rf /var/cache/apk/* RUN npm install -g pnpm@9.15.3 --ignore-scripts WORKDIR /app COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./ @@ -22,6 +22,5 @@ WORKDIR /app COPY --from=build /app/dist/apps/ledger/ ./dist/apps/ledger/ COPY --from=build /app/libs/ ./libs/ COPY --from=build /app/node_modules ./node_modules -RUN find ./node_modules -type d -name ".prisma" -exec chown -R nextjs:nodejs {} + USER nextjs -CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/ledger/main.js"] \ No newline at end of file +CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && cd ../.. && node dist/apps/ledger/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.notification b/Dockerfiles/Dockerfile.notification index 4579bc4d3..24587eefd 100644 --- a/Dockerfiles/Dockerfile.notification +++ b/Dockerfiles/Dockerfile.notification @@ -21,6 +21,5 @@ WORKDIR /app COPY --from=build /app/dist/apps/notification/ ./dist/apps/notification/ COPY --from=build /app/libs/ ./libs/ COPY --from=build /app/node_modules ./node_modules -RUN find ./node_modules -type d -name ".prisma" -exec chown -R nextjs:nodejs {} + USER nextjs -CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/notification/main.js"] \ No newline at end of file +CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && cd ../.. && node dist/apps/notification/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.oid4vc-issuance b/Dockerfiles/Dockerfile.oid4vc-issuance index 163508d00..220e998ab 100644 --- a/Dockerfiles/Dockerfile.oid4vc-issuance +++ b/Dockerfiles/Dockerfile.oid4vc-issuance @@ -21,6 +21,5 @@ WORKDIR /app COPY --from=build /app/dist/apps/oid4vc-issuance/ ./dist/apps/oid4vc-issuance/ COPY --from=build /app/libs/ ./libs/ COPY --from=build /app/node_modules ./node_modules -RUN find ./node_modules -type d -name ".prisma" -exec chown -R nextjs:nodejs {} + USER nextjs -CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/oid4vc-issuance/main.js"] \ No newline at end of file +CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && cd ../.. && node dist/apps/oid4vc-issuance/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.oid4vc-verification b/Dockerfiles/Dockerfile.oid4vc-verification index 05cfdfaa2..199374ef1 100644 --- a/Dockerfiles/Dockerfile.oid4vc-verification +++ b/Dockerfiles/Dockerfile.oid4vc-verification @@ -1,7 +1,7 @@ # Stage 1: Build the application FROM node:24-alpine3.21 AS build RUN apk update && apk upgrade && apk add --no-cache openssl=3.3.6-r0 \ - && rm -rf /var/cache/apk/* + && rm -rf /var/cache/apk/* RUN npm install -g pnpm@9.15.3 --ignore-scripts WORKDIR /app COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./ @@ -22,6 +22,5 @@ WORKDIR /app COPY --from=build /app/dist/apps/oid4vc-verification/ ./dist/apps/oid4vc-verification/ COPY --from=build /app/libs/ ./libs/ COPY --from=build /app/node_modules ./node_modules -RUN find ./node_modules -type d -name ".prisma" -exec chown -R nextjs:nodejs {} + USER nextjs -CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/oid4vc-verification/main.js"] +CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && cd ../.. && node dist/apps/oid4vc-verification/main.js"] diff --git a/Dockerfiles/Dockerfile.organization b/Dockerfiles/Dockerfile.organization index 7e77771c8..80efd77c4 100644 --- a/Dockerfiles/Dockerfile.organization +++ b/Dockerfiles/Dockerfile.organization @@ -1,7 +1,7 @@ # Stage 1: Build the application FROM node:24-alpine3.21 AS build RUN apk update && apk upgrade && apk add --no-cache openssl=3.3.6-r0 \ - && rm -rf /var/cache/apk/* + && rm -rf /var/cache/apk/* RUN npm install -g pnpm@9.15.3 --ignore-scripts WORKDIR /app COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./ @@ -22,6 +22,5 @@ WORKDIR /app COPY --from=build /app/dist/apps/organization/ ./dist/apps/organization/ COPY --from=build /app/libs/ ./libs/ COPY --from=build /app/node_modules ./node_modules -RUN find ./node_modules -type d -name ".prisma" -exec chown -R nextjs:nodejs {} + USER nextjs -CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/organization/main.js"] \ No newline at end of file +CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && cd ../.. && node dist/apps/organization/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.user b/Dockerfiles/Dockerfile.user index 251d3579f..7fbfe1d9e 100644 --- a/Dockerfiles/Dockerfile.user +++ b/Dockerfiles/Dockerfile.user @@ -1,7 +1,7 @@ # Stage 1: Build the application FROM node:24-alpine3.21 AS build RUN apk update && apk upgrade && apk add --no-cache openssl=3.3.6-r0 \ - && rm -rf /var/cache/apk/* + && rm -rf /var/cache/apk/* RUN npm install -g pnpm@9.15.3 --ignore-scripts WORKDIR /app COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./ @@ -22,6 +22,5 @@ WORKDIR /app COPY --from=build /app/dist/apps/user/ ./dist/apps/user/ COPY --from=build /app/libs/ ./libs/ COPY --from=build /app/node_modules ./node_modules -RUN find ./node_modules -type d -name ".prisma" -exec chown -R nextjs:nodejs {} + USER nextjs -CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/user/main.js"] \ No newline at end of file +CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && cd ../.. && node dist/apps/user/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.utility b/Dockerfiles/Dockerfile.utility index 05d00d125..7b503cce9 100644 --- a/Dockerfiles/Dockerfile.utility +++ b/Dockerfiles/Dockerfile.utility @@ -1,7 +1,7 @@ # Stage 1: Build the application FROM node:24-alpine3.21 AS build RUN apk update && apk upgrade && apk add --no-cache openssl=3.3.6-r0 \ - && rm -rf /var/cache/apk/* + && rm -rf /var/cache/apk/* RUN npm install -g pnpm@9.15.3 --ignore-scripts WORKDIR /app COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./ @@ -22,6 +22,5 @@ WORKDIR /app COPY --from=build /app/dist/apps/utility/ ./dist/apps/utility/ COPY --from=build /app/libs/ ./libs/ COPY --from=build /app/node_modules ./node_modules -RUN find ./node_modules -type d -name ".prisma" -exec chown -R nextjs:nodejs {} + USER nextjs -CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/utility/main.js"] \ No newline at end of file +CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && cd ../.. && node dist/apps/utility/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.verification b/Dockerfiles/Dockerfile.verification index d913eb1be..9bd2a7123 100644 --- a/Dockerfiles/Dockerfile.verification +++ b/Dockerfiles/Dockerfile.verification @@ -1,7 +1,7 @@ # Stage 1: Build the application FROM node:24-alpine3.21 AS build RUN apk update && apk upgrade && apk add --no-cache openssl=3.3.6-r0 \ - && rm -rf /var/cache/apk/* + && rm -rf /var/cache/apk/* RUN npm install -g pnpm@9.15.3 --ignore-scripts WORKDIR /app COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./ @@ -22,6 +22,5 @@ WORKDIR /app COPY --from=build /app/dist/apps/verification/ ./dist/apps/verification/ COPY --from=build /app/libs/ ./libs/ COPY --from=build /app/node_modules ./node_modules -RUN find ./node_modules -type d -name ".prisma" -exec chown -R nextjs:nodejs {} + USER nextjs -CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/verification/main.js"] \ No newline at end of file +CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && cd ../.. && node dist/apps/verification/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.webhook b/Dockerfiles/Dockerfile.webhook index a5bbdc3eb..a08657504 100644 --- a/Dockerfiles/Dockerfile.webhook +++ b/Dockerfiles/Dockerfile.webhook @@ -1,7 +1,7 @@ # Stage 1: Build the application FROM node:24-alpine3.21 AS build RUN apk update && apk upgrade && apk add --no-cache openssl=3.3.6-r0 \ - && rm -rf /var/cache/apk/* + && rm -rf /var/cache/apk/* RUN npm install -g pnpm@9.15.3 --ignore-scripts WORKDIR /app COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./ @@ -22,6 +22,5 @@ WORKDIR /app COPY --from=build /app/dist/apps/webhook/ ./dist/apps/webhook/ COPY --from=build /app/libs/ ./libs/ COPY --from=build /app/node_modules ./node_modules -RUN find ./node_modules -type d -name ".prisma" -exec chown -R nextjs:nodejs {} + USER nextjs -CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/webhook/main.js"] \ No newline at end of file +CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && cd ../.. && node dist/apps/webhook/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.x509 b/Dockerfiles/Dockerfile.x509 index e71397c3d..2ab1c4e76 100644 --- a/Dockerfiles/Dockerfile.x509 +++ b/Dockerfiles/Dockerfile.x509 @@ -1,7 +1,7 @@ # Stage 1: Build the application FROM node:24-alpine3.21 AS build RUN apk update && apk upgrade && apk add --no-cache openssl=3.3.6-r0 \ - && rm -rf /var/cache/apk/* + && rm -rf /var/cache/apk/* RUN npm install -g pnpm@9.15.3 --ignore-scripts WORKDIR /app COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./ @@ -22,6 +22,5 @@ WORKDIR /app COPY --from=build /app/dist/apps/x509/ ./dist/apps/x509/ COPY --from=build /app/libs/ ./libs/ COPY --from=build /app/node_modules ./node_modules -RUN find ./node_modules -type d -name ".prisma" -exec chown -R nextjs:nodejs {} + USER nextjs -CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/x509/main.js"] +CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && cd ../.. && node dist/apps/x509/main.js"] diff --git a/docker-compose-dev.yml b/docker-compose-dev.yml index bf3dc893e..59d392828 100644 --- a/docker-compose-dev.yml +++ b/docker-compose-dev.yml @@ -129,6 +129,7 @@ services: - ./.env environment: - ROOT_PATH=$PWD/apps/agent-provisioning/AFJ/agent-config + user: root volumes: - $PWD/apps/agent-provisioning/AFJ/agent-config:/app/agent-provisioning/AFJ/agent-config - /var/run/docker.sock:/var/run/docker.sock @@ -151,6 +152,7 @@ services: dockerfile: Dockerfiles/Dockerfile.agent-service env_file: - ./.env + user: root volumes: - /var/run/docker.sock:/var/run/docker.sock volumes_from: diff --git a/docker-compose.yml b/docker-compose.yml index 95aee4d67..0a9348b91 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -118,6 +118,7 @@ services: - ./.env environment: - ROOT_PATH=$PWD/apps/agent-provisioning/AFJ/agent-config + user: root volumes: - $PWD/apps/agent-provisioning/AFJ/agent-config:/app/agent-provisioning/AFJ/agent-config - /var/run/docker.sock:/var/run/docker.sock @@ -138,6 +139,7 @@ services: image: ghcr.io/credebl/agent-service:latest env_file: - ./.env + user: root volumes: - /var/run/docker.sock:/var/run/docker.sock volumes_from: From 4a323938d4c1b59d4c10cf7335b200af53cdc7b7 Mon Sep 17 00:00:00 2001 From: "sahil.kamble@ayanworks.com" Date: Wed, 1 Apr 2026 19:45:49 +0530 Subject: [PATCH 6/6] fix: Update seed dockerfile and scripts for AFJ Signed-off-by: sahil.kamble@ayanworks.com --- Dockerfiles/Dockerfile.seed | 2 +- .../AFJ/scripts/docker_start_agent.sh | 2 +- .../agent-provisioning/AFJ/scripts/fargate.sh | 2 +- .../AFJ/scripts/on_premises_agent.sh | 2 +- .../AFJ/scripts/start_agent.sh | 2 +- .../AFJ/scripts/start_agent_ecs.sh | 2 +- docker-compose.yml | 38 ++++++++++++++++++- 7 files changed, 43 insertions(+), 7 deletions(-) diff --git a/Dockerfiles/Dockerfile.seed b/Dockerfiles/Dockerfile.seed index b1b37c474..39213de21 100644 --- a/Dockerfiles/Dockerfile.seed +++ b/Dockerfiles/Dockerfile.seed @@ -13,4 +13,4 @@ RUN pnpm i --frozen-lockfile --ignore-scripts \ && cd libs/prisma-service && npx prisma generate \ && chown -R nextjs:nodejs /app USER nextjs -CMD ["sh", "-c", "cd libs/prisma-service && npx prisma db seed"] \ No newline at end of file +CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma db seed"] \ No newline at end of file diff --git a/apps/agent-provisioning/AFJ/scripts/docker_start_agent.sh b/apps/agent-provisioning/AFJ/scripts/docker_start_agent.sh index 5a3754140..ec7afe5a3 100644 --- a/apps/agent-provisioning/AFJ/scripts/docker_start_agent.sh +++ b/apps/agent-provisioning/AFJ/scripts/docker_start_agent.sh @@ -126,7 +126,7 @@ cat <${CONFIG_FILE} "walletPassword": "$WALLET_STORAGE_PASSWORD", "walletAdminAccount": "$WALLET_STORAGE_USER", "walletAdminPassword": "$WALLET_STORAGE_PASSWORD", - "walletScheme": "DatabasePerWallet", + "walletScheme": "ProfilePerWallet", "indyLedger": $INDY_LEDGER, "endpoint": [ "$AGENT_ENDPOINT" diff --git a/apps/agent-provisioning/AFJ/scripts/fargate.sh b/apps/agent-provisioning/AFJ/scripts/fargate.sh index 6033f03c2..d707be981 100644 --- a/apps/agent-provisioning/AFJ/scripts/fargate.sh +++ b/apps/agent-provisioning/AFJ/scripts/fargate.sh @@ -127,7 +127,7 @@ cat <$PWD/agent-provisioning/AFJ/agent-config/${AGENCY}_${CONTAINER_NAME}. "walletPassword": "$WALLET_STORAGE_PASSWORD", "walletAdminAccount": "$WALLET_STORAGE_USER", "walletAdminPassword": "$WALLET_STORAGE_PASSWORD", - "walletScheme": "DatabasePerWallet", + "walletScheme": "ProfilePerWallet", "indyLedger": $INDY_LEDGER, "endpoint": [ "$INBOUND_ENDPOINT" diff --git a/apps/agent-provisioning/AFJ/scripts/on_premises_agent.sh b/apps/agent-provisioning/AFJ/scripts/on_premises_agent.sh index 5b1136290..563c1ca06 100644 --- a/apps/agent-provisioning/AFJ/scripts/on_premises_agent.sh +++ b/apps/agent-provisioning/AFJ/scripts/on_premises_agent.sh @@ -214,7 +214,7 @@ cat <${CONFIG_FILE} "walletPassword": "$WALLET_STORAGE_PASSWORD", "walletAdminAccount": "$WALLET_STORAGE_USER", "walletAdminPassword": "$WALLET_STORAGE_PASSWORD", - "walletScheme": "DatabasePerWallet", + "walletScheme": "ProfilePerWallet", "indyLedger": $INDY_LEDGER_FORMATTED, "endpoint": [ "$AGENT_ENDPOINT" diff --git a/apps/agent-provisioning/AFJ/scripts/start_agent.sh b/apps/agent-provisioning/AFJ/scripts/start_agent.sh index db8c49b24..c15c2ce83 100755 --- a/apps/agent-provisioning/AFJ/scripts/start_agent.sh +++ b/apps/agent-provisioning/AFJ/scripts/start_agent.sh @@ -126,7 +126,7 @@ cat <"$CONFIG_FILE" "walletPassword": "$WALLET_STORAGE_PASSWORD", "walletAdminAccount": "$WALLET_STORAGE_USER", "walletAdminPassword": "$WALLET_STORAGE_PASSWORD", - "walletScheme": "DatabasePerWallet", + "walletScheme": "ProfilePerWallet", "indyLedger": $INDY_LEDGER, "endpoint": [ "$AGENT_ENDPOINT" diff --git a/apps/agent-provisioning/AFJ/scripts/start_agent_ecs.sh b/apps/agent-provisioning/AFJ/scripts/start_agent_ecs.sh index 03a989c92..bfc7e8610 100644 --- a/apps/agent-provisioning/AFJ/scripts/start_agent_ecs.sh +++ b/apps/agent-provisioning/AFJ/scripts/start_agent_ecs.sh @@ -124,7 +124,7 @@ cat </app/agent-provisioning/AFJ/agent-config/${AGENCY}_${CONTAINER_NAME}. "walletPassword": "$WALLET_STORAGE_PASSWORD", "walletAdminAccount": "$WALLET_STORAGE_USER", "walletAdminPassword": "$WALLET_STORAGE_PASSWORD", - "walletScheme": "DatabasePerWallet", + "walletScheme": "ProfilePerWallet", "indyLedger": $INDY_LEDGER, "endpoint": [ "$INBOUND_ENDPOINT" diff --git a/docker-compose.yml b/docker-compose.yml index 0a9348b91..a2701cfa2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -25,7 +25,7 @@ services: env_file: - ./.env volumes: - - $PWD/libs/prisma-service/prisma/data/credebl-master-table.json:/app/libs/prisma-service/prisma/data/credebl-master-table.json + - $PWD/libs/prisma-service/prisma/data/credebl-master-table/credebl-master-table.json:/app/libs/prisma-service/prisma/data/credebl-master-table.json api-gateway: depends_on: - nats # Use depends_on instead of needs @@ -172,6 +172,42 @@ services: image: ghcr.io/credebl/webhook:latest env_file: - ./.env + ecosystem: + depends_on: + - nats + - api-gateway + build: + context: ./ # Adjust the context path as needed + dockerfile: Dockerfiles/Dockerfile.ecosystem + env_file: + - ./.env + oid4vc-issuance: + depends_on: + - nats + - api-gateway + build: + context: ./ # Adjust the context path as needed + dockerfile: Dockerfiles/Dockerfile.oid4vc-issuance + env_file: + - ./.env + oid4vc-verification: + depends_on: + - nats + - api-gateway + build: + context: ./ # Adjust the context path as needed + dockerfile: Dockerfiles/Dockerfile.oid4vc-verification + env_file: + - ./.env + x509: + depends_on: + - nats + - api-gateway + build: + context: ./ # Adjust the context path as needed + dockerfile: Dockerfiles/Dockerfile.x509 + env_file: + - ./.env schema-file-server: container_name: schema-file-server image: ghcr.io/credebl/schema-file-server:latest