Skip to content

Commit

Permalink
Merge branch 'master' into update/login-creds
Browse files Browse the repository at this point in the history
  • Loading branch information
gkatrakazas committed Jun 10, 2024
2 parents 6fa7c73 + f7c0464 commit 666dbfe
Show file tree
Hide file tree
Showing 13 changed files with 291 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/docker-build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ on:
type: boolean
required: true

dockerfile-path:
type: string
required: true

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -32,7 +36,7 @@ jobs:
- uses: docker/build-push-action@v3
with:
context: .
file: ./Dockerfile
file: ${{ inputs.dockerfile-path }}
push: ${{ inputs.docker-push }}
tags: ${{ inputs.image-tag }}
secret-files: |
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/docker-image-wallet-enterprise-acme-verifier.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Build Docker image
on:
push:
branches-ignore:
- master
pull_request:

jobs:
build-acme:
permissions:
contents: read
packages: read

uses: ./.github/workflows/docker-build-push.yml
secrets: inherit
with:
image-tag: ghcr.io/wwwallet/wallet-enterprise-acme-verifier:latest
docker-push: false
dockerfile-path: ./wallet-enterprise-configurations/acme-verifier/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Build Docker image
on:
push:
branches-ignore:
- master
pull_request:

jobs:
build-diploma:
permissions:
contents: read
packages: read

uses: ./.github/workflows/docker-build-push.yml
secrets: inherit
with:
image-tag: ghcr.io/wwwallet/wallet-enterprise-diploma-issuer:latest
docker-push: false
dockerfile-path: ./wallet-enterprise-configurations/diploma-issuer/Dockerfile
19 changes: 19 additions & 0 deletions .github/workflows/docker-image-wallet-enterprise-ehic-issuer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Build Docker image
on:
push:
branches-ignore:
- master
pull_request:

jobs:
build-ehic:
permissions:
contents: read
packages: read

uses: ./.github/workflows/docker-build-push.yml
secrets: inherit
with:
image-tag: ghcr.io/wwwallet/wallet-enterprise-ehic-issuer:latest
docker-push: false
dockerfile-path: ./wallet-enterprise-configurations/ehic-issuer/Dockerfile
19 changes: 19 additions & 0 deletions .github/workflows/docker-image-wallet-enterprise-vid-issuer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Build Docker image
on:
push:
branches-ignore:
- master
pull_request:

jobs:
build-vid:
permissions:
contents: read
packages: read

uses: ./.github/workflows/docker-build-push.yml
secrets: inherit
with:
image-tag: ghcr.io/wwwallet/wallet-enterprise-vid-issuer:latest
docker-push: false
dockerfile-path: ./wallet-enterprise-configurations/vid-issuer/Dockerfile
20 changes: 20 additions & 0 deletions .github/workflows/docker-push-wallet-enterprise-acme-verifier.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Push Docker image
on:
push:
tags:
- v0.*
- v1.*
- v2.*

jobs:
push-acme:
permissions:
contents: read
packages: write

uses: ./.github/workflows/docker-build-push.yml
secrets: inherit
with:
image-tag: ghcr.io/wwwallet/wallet-enterprise-acme-verifier:${{ github.ref_name }}
docker-push: true
dockerfile-path: ./wallet-enterprise-configurations/acme-verifier/Dockerfile
20 changes: 20 additions & 0 deletions .github/workflows/docker-push-wallet-enterprise-diploma-issuer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Push Docker image
on:
push:
tags:
- v0.*
- v1.*
- v2.*

jobs:
push-diploma:
permissions:
contents: read
packages: write

uses: ./.github/workflows/docker-build-push.yml
secrets: inherit
with:
image-tag: ghcr.io/wwwallet/wallet-enterprise-diploma-issuer:${{ github.ref_name }}
docker-push: true
dockerfile-path: ./wallet-enterprise-configurations/diploma-issuer/Dockerfile
20 changes: 20 additions & 0 deletions .github/workflows/docker-push-wallet-enterprise-ehic-issuer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Push Docker image
on:
push:
tags:
- v0.*
- v1.*
- v2.*

jobs:
push-ehic:
permissions:
contents: read
packages: write

uses: ./.github/workflows/docker-build-push.yml
secrets: inherit
with:
image-tag: ghcr.io/wwwallet/wallet-enterprise-ehic-issuer:${{ github.ref_name }}
docker-push: true
dockerfile-path: ./wallet-enterprise-configurations/ehic-issuer/Dockerfile
20 changes: 20 additions & 0 deletions .github/workflows/docker-push-wallet-enterprise-vid-issuer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Push Docker image
on:
push:
tags:
- v0.*
- v1.*
- v2.*

jobs:
push-vid:
permissions:
contents: read
packages: write

uses: ./.github/workflows/docker-build-push.yml
secrets: inherit
with:
image-tag: ghcr.io/wwwallet/wallet-enterprise-vid-issuer:${{ github.ref_name }}
docker-push: true
dockerfile-path: ./wallet-enterprise-configurations/vid-issuer/Dockerfile
37 changes: 37 additions & 0 deletions wallet-enterprise-configurations/acme-verifier/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Builder stage
FROM ghcr.io/wwwallet/wallet-enterprise:base AS builder
WORKDIR /app


COPY wallet-enterprise/ .
RUN rm -rf /app/src/configuration/
COPY ./wallet-enterprise-configurations/acme-verifier/src/configuration/ /app/src/configuration/
COPY ./wallet-enterprise-configurations/acme-verifier/views/index.pug /app/views/index.pug
COPY ./wallet-enterprise-configurations/acme-verifier/views/header.pug /app/views/header.pug
COPY ./wallet-enterprise-configurations/acme-verifier/views/verifier/public_definitions.pug /app/views/verifier/public_definitions.pug
COPY ./wallet-enterprise-configurations/acme-verifier/views/verifier/QR.pug /app/views/verifier/QR.pug
COPY ./wallet-enterprise-configurations/acme-verifier/views/verifier/success.pug /app/views/verifier/success.pug
COPY ./wallet-enterprise-configurations/acme-verifier/public/styles/styles.css /app/public/styles/styles.css
COPY ./wallet-enterprise-configurations/acme-verifier/public/images /app/public/images

RUN --mount=type=secret,id=npmrc,required=true,target=./.npmrc,uid=1000 \
yarn cache clean && yarn install && yarn build

# Production stage
FROM node:16-bullseye-slim AS production
WORKDIR /app

COPY --from=builder /app/package.json .
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/public ./public
COPY --from=builder /app/views/ ./views/


RUN --mount=type=secret,id=npmrc,required=true,target=./.npmrc,uid=1000 \
yarn cache clean && yarn install --production


ENV NODE_ENV production
EXPOSE 8003

CMD ["node", "./dist/src/app.js"]
32 changes: 32 additions & 0 deletions wallet-enterprise-configurations/diploma-issuer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Builder stage
FROM ghcr.io/wwwallet/wallet-enterprise:base AS builder
WORKDIR /app

COPY wallet-enterprise/ .
RUN rm -rf src/configuration/
COPY ./wallet-enterprise-configurations/diploma-issuer/src/configuration /app/src/configuration
COPY ./wallet-enterprise-configurations/diploma-issuer/views/issuer/login.pug /app/views/issuer/login.pug
COPY ./wallet-enterprise-configurations/diploma-issuer/public/styles/styles.css /app/public/styles/styles.css
COPY ./wallet-enterprise-configurations/diploma-issuer/public/images /app/public/images
COPY ./wallet-enterprise-configurations/diploma-issuer/views/header.pug /app/views/header.pug
COPY ./wallet-enterprise-configurations/diploma-issuer/views/index.pug /app/views/index.pug

RUN --mount=type=secret,id=npmrc,required=true,target=./.npmrc,uid=1000 \
yarn cache clean && yarn install && yarn build

# Production stage
FROM node:16-bullseye-slim AS production
WORKDIR /app

COPY --from=builder /app/package.json .
COPY --from=builder /app/dist/ ./dist/
COPY --from=builder /app/public/ ./public/
COPY --from=builder /app/views/ ./views/

RUN --mount=type=secret,id=npmrc,required=true,target=./.npmrc,uid=1000 \
yarn cache clean && yarn install --production

ENV NODE_ENV production
EXPOSE 8003

CMD ["node", "./dist/src/app.js"]
30 changes: 30 additions & 0 deletions wallet-enterprise-configurations/ehic-issuer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Builder stage
FROM ghcr.io/wwwallet/wallet-enterprise:base AS builder
WORKDIR /app

# COPY wallet-enterprise/ .
RUN rm -rf src/configuration/
COPY ./wallet-enterprise-configurations/ehic-issuer/src/configuration/ src/configuration/
COPY ./wallet-enterprise-configurations/ehic-issuer/views/header.pug views/header.pug


RUN --mount=type=secret,id=npmrc,required=true,target=./.npmrc,uid=1000 \
yarn cache clean && yarn install && yarn build

# Production stage
FROM node:16-bullseye-slim AS production
WORKDIR /app

COPY --from=builder /app/package.json .
COPY --from=builder /app/dist/ ./dist/
COPY --from=builder /app/public/ ./public/
COPY --from=builder /app/views/ ./views/


RUN --mount=type=secret,id=npmrc,required=true,target=./.npmrc,uid=1000 \
yarn cache clean && yarn install --production

ENV NODE_ENV production
EXPOSE 8003

CMD ["node", "./dist/src/app.js"]
31 changes: 31 additions & 0 deletions wallet-enterprise-configurations/vid-issuer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Builder stage
FROM ghcr.io/wwwallet/wallet-enterprise:base AS builder
WORKDIR /app

COPY wallet-enterprise/ .
RUN rm -rf src/configuration/
COPY ./wallet-enterprise-configurations/vid-issuer/src/configuration/ src/configuration/
COPY ./wallet-enterprise-configurations/vid-issuer/public/styles/styles.css public/styles/styles.css
COPY ./wallet-enterprise-configurations/vid-issuer/public/images/ public/images/
COPY ./wallet-enterprise-configurations/vid-issuer/views/header.pug /app/views/header.pug
COPY ./wallet-enterprise-configurations/vid-issuer/views/index.pug /app/views/index.pug

RUN --mount=type=secret,id=npmrc,required=true,target=./.npmrc,uid=1000 \
yarn cache clean && yarn install && yarn build

# Production stage
FROM node:16-bullseye-slim AS production
WORKDIR /app

COPY --from=builder /app/package.json .
COPY --from=builder /app/dist/ ./dist/
COPY --from=builder /app/public/ ./public/
COPY --from=builder /app/views/ ./views/

RUN --mount=type=secret,id=npmrc,required=true,target=./.npmrc,uid=1000 \
yarn cache clean && yarn install --production

ENV NODE_ENV production
EXPOSE 8003

CMD ["node", "./dist/src/app.js"]

0 comments on commit 666dbfe

Please sign in to comment.