-
Notifications
You must be signed in to change notification settings - Fork 71
feat: OID4VC, OID4VP and X509 capabilities - experimental feature #1517
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 42 commits
f52f1d2
1e07fe3
a3ee18c
9f24e19
c2c8a2a
967ead5
f946434
4e9afaf
13e0c1e
140d0c0
bbacbe3
74bbafe
39d244b
a891c95
259455f
9fe57ee
953ef8d
25c6b13
ffaa672
4e3ec43
6a66cf4
4174168
407d649
76c3b70
43e918c
61f6f6a
ca3f3c3
ff1ce9b
76350ed
0531a88
3c3d3d2
8150fc0
3fa8073
2567509
94e6bbb
2ed0396
69adb3e
9fe4486
dddc4be
24f835c
92a9e36
e9477f1
691aee9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,43 @@ | ||||||||||||||
| # Stage 1: Build the application | ||||||||||||||
| FROM node:18-alpine as build | ||||||||||||||
|
Check warning on line 2 in Dockerfiles/Dockerfile.oid4vc-issuance
|
||||||||||||||
| # Install OpenSSL | ||||||||||||||
| RUN apk add --no-cache openssl | ||||||||||||||
| RUN npm install -g pnpm | ||||||||||||||
| # Set the working directory | ||||||||||||||
| WORKDIR /app | ||||||||||||||
|
|
||||||||||||||
| # Copy package.json and package-lock.json | ||||||||||||||
| COPY package.json ./ | ||||||||||||||
| COPY pnpm-workspace.yaml ./ | ||||||||||||||
|
Comment on lines
+9
to
+11
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Update comment to match the actual code. The comment on line 9 references copying Apply this diff: -# Copy package.json and package-lock.json
+# Copy package.json and pnpm-workspace.yaml📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||
|
|
||||||||||||||
| ENV PUPPETEER_SKIP_DOWNLOAD=true | ||||||||||||||
|
|
||||||||||||||
| # Install dependencies while ignoring scripts (including Puppeteer's installation) | ||||||||||||||
| RUN pnpm i --ignore-scripts | ||||||||||||||
|
|
||||||||||||||
| # Copy the rest of the application code | ||||||||||||||
| COPY . . | ||||||||||||||
| RUN cd libs/prisma-service && npx prisma generate | ||||||||||||||
|
|
||||||||||||||
| # Build the oid4vc-issuance service | ||||||||||||||
| RUN npm run build oid4vc-issuance | ||||||||||||||
|
|
||||||||||||||
|
|
||||||||||||||
| # Stage 2: Create the final image | ||||||||||||||
| FROM node:18-alpine | ||||||||||||||
| # Install OpenSSL | ||||||||||||||
| RUN apk add --no-cache openssl | ||||||||||||||
|
|
||||||||||||||
| # Set the working directory | ||||||||||||||
| WORKDIR /app | ||||||||||||||
|
|
||||||||||||||
| # Copy the compiled code from the build stage | ||||||||||||||
| COPY --from=build /app/dist/apps/oid4vc-issuance/ ./dist/apps/oid4vc-issuance/ | ||||||||||||||
|
|
||||||||||||||
| # Copy the libs folder from the build stage | ||||||||||||||
| COPY --from=build /app/libs/ ./libs/ | ||||||||||||||
|
|
||||||||||||||
| COPY --from=build /app/node_modules ./node_modules | ||||||||||||||
|
|
||||||||||||||
| # Set the command to run the microservice | ||||||||||||||
| CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/oid4vc-issuance/main.js"] | ||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| # Stage 1: Build the application | ||
| FROM node:18-alpine as build | ||
|
Check warning on line 2 in Dockerfiles/Dockerfile.oid4vc-verification
|
||
| # Install OpenSSL | ||
| RUN apk add --no-cache openssl | ||
| RUN npm install -g pnpm | ||
| # Set the working directory | ||
| WORKDIR /app | ||
|
|
||
| # Copy package.json and package-lock.json | ||
| COPY package.json ./ | ||
| COPY pnpm-workspace.yaml ./ | ||
|
|
||
| ENV PUPPETEER_SKIP_DOWNLOAD=true | ||
|
|
||
| # Install dependencies while ignoring scripts (including Puppeteer's installation) | ||
| RUN pnpm i --ignore-scripts | ||
|
|
||
| # Copy the rest of the application code | ||
| COPY . . | ||
|
|
||
| RUN cd libs/prisma-service && npx prisma generate | ||
|
|
||
| # Build the oid4vc-verification service | ||
| RUN npm run build oid4vc-verification | ||
|
|
||
|
|
||
| # Stage 2: Create the final image | ||
| FROM node:18-alpine | ||
| # Install OpenSSL | ||
| RUN apk add --no-cache openssl | ||
|
|
||
| # Set the working directory | ||
| WORKDIR /app | ||
|
|
||
| # Copy the compiled code from the build stage | ||
| COPY --from=build /app/dist/apps/oid4vc-verification/ ./dist/apps/oid4vc-verification/ | ||
|
|
||
| # Copy the libs folder from the build stage | ||
| COPY --from=build /app/libs/ ./libs/ | ||
|
|
||
| COPY --from=build /app/node_modules ./node_modules | ||
|
|
||
| # Set the command to run the microservice | ||
| CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/oid4vc-verification/main.js"] | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Avoid running migrations in the container startup command. Running Consider one of these approaches:
If migrations must run on startup for development/testing, add a lock mechanism to prevent concurrent migration attempts. 🤖 Prompt for AI Agents |
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,43 @@ | ||||||
| # Stage 1: Build the application | ||||||
| FROM node:18-alpine as build | ||||||
|
Check warning on line 2 in Dockerfiles/Dockerfile.x509
|
||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use uppercase "AS" for Dockerfile multi-stage build syntax. Docker best practices and linters recommend using uppercase keywords for Dockerfile instructions, including the multi-stage build alias. Apply this diff: -FROM node:18-alpine as build
+FROM node:18-alpine AS build📝 Committable suggestion
Suggested change
🧰 Tools🪛 GitHub Check: SonarCloud Code Analysis[warning] 2-2: Replace "as" with upper case format "AS". 🤖 Prompt for AI Agents |
||||||
| # Install OpenSSL | ||||||
| RUN apk add --no-cache openssl | ||||||
| RUN npm install -g pnpm | ||||||
| # Set the working directory | ||||||
| WORKDIR /app | ||||||
|
|
||||||
| COPY package.json ./ | ||||||
| COPY pnpm-workspace.yaml ./ | ||||||
|
|
||||||
| ENV PUPPETEER_SKIP_DOWNLOAD=true | ||||||
|
|
||||||
| # Install dependencies while ignoring scripts (including Puppeteer's installation) | ||||||
| RUN pnpm i --ignore-scripts | ||||||
|
|
||||||
| # Copy the rest of the application code | ||||||
| COPY . . | ||||||
|
|
||||||
| RUN cd libs/prisma-service && npx prisma generate | ||||||
|
|
||||||
| # Build the x509 service | ||||||
| RUN npm run build x509 | ||||||
|
|
||||||
|
|
||||||
| # Stage 2: Create the final image | ||||||
| FROM node:18-alpine | ||||||
| # Install OpenSSL | ||||||
| RUN apk add --no-cache openssl | ||||||
|
|
||||||
| # Set the working directory | ||||||
| WORKDIR /app | ||||||
|
|
||||||
| # Copy the compiled code from the build stage | ||||||
| COPY --from=build /app/dist/apps/x509/ ./dist/apps/x509/ | ||||||
|
|
||||||
| # Copy the libs folder from the build stage | ||||||
| COPY --from=build /app/libs/ ./libs/ | ||||||
|
|
||||||
| COPY --from=build /app/node_modules ./node_modules | ||||||
|
|
||||||
| # Set the command to run the microservice | ||||||
| CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/x509/main.js"] | ||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use uppercase "AS" for Dockerfile multi-stage build syntax.
Docker best practices recommend using uppercase keywords for Dockerfile instructions, including the multi-stage build alias.
Apply this diff:
📝 Committable suggestion
🤖 Prompt for AI Agents