Skip to content
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

created docker file for base image, added workflows for base image and added hook for new release #46

Merged
merged 1 commit into from
May 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/workflows/docker-base-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Build Docker image

on:
push:
branches-ignore:
- master
pull_request:

jobs:
build-base:
# Permissions for GITHUB_TOKEN
permissions:
contents: read # To check out repo
packages: read # To read NPM registry

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


jobs:
push-base:
# Permissions for GITHUB_TOKEN
permissions:
contents: read # To check out repo
packages: write # To read NPM registry

uses: wwwallet/wallet-ecosystem/.github/workflows/docker-build-push.yml@master
secrets: inherit
with:
image-tag: ghcr.io/wwwallet/wallet-enterprise:base-${{ github.ref_name }}
docker-push: true
dockerfile-path: ./base.Dockerfile
2 changes: 2 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:
packages: read # To read NPM registry

uses: wwwallet/wallet-ecosystem/.github/workflows/docker-build-push.yml@master
secrets: inherit
with:
image-tag: ghcr.io/wwwallet/wallet-enterprise:latest
docker-push: false
dockerfile-path: ./Dockerfile
14 changes: 9 additions & 5 deletions .github/workflows/docker-push.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
name: Build and push Docker image

name: Push Docker image
on:
push:
branches:
- master
tags:
- v0.*
- v1.*
- v2.*


jobs:
build:
Expand All @@ -14,6 +16,8 @@ jobs:
packages: write # To read NPM registry and push Docker image

uses: wwwallet/wallet-ecosystem/.github/workflows/docker-build-push.yml@master
secrets: inherit
with:
image-tag: ghcr.io/wwwallet/wallet-enterprise:latest
image-tag: ghcr.io/wwwallet/wallet-enterprise:${{ github.ref_name }}
docker-push: true
dockerfile-path: ./Dockerfile
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ COPY --from=builder /home/node/app/views ./views


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

ENV NODE_ENV production
EXPOSE 8003
Expand Down
5 changes: 5 additions & 0 deletions base.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM node:16-bullseye-slim

WORKDIR /app

COPY . .