Repository navigation
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
Changes from all commits
686982c
25ea007
89fbbda
2c6559b
17b2683
b21b11c
b8db657
7514357
426e57c
eaf7867
cc803e7
01d8eee
ea0b29d
3d0a4ef
f0a7381
2110fc4
08e6a81
6e9f245
c51351e
6adc03d
30d473d
803c46e
ee1b5cf
c0cb76c
5af3d90
d3881d4
7759c7d
1175e2d
c663ee3
d816189
07a255e
028932f
7486905
69415da
6f8ef8d
5bed811
ef8c4a8
3995015
5c93023
4eb48de
1ca64f1
3832ca2
3856b8d
c25d509
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 | ||||||||||||||
| # 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"] | ||||||||||||||
|
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. |
||||||||||||||
| 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 | ||||||||||||||
| # 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 files being copied. The comment references Apply this diff: -# Copy package.json and package-lock.json
+# Copy package.json and pnpm-workspace.yaml
COPY package.json ./
COPY 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-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 | ||||||
|
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