Skip to content

Commit

Permalink
update actions pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
hkbu-kennycheng committed Oct 31, 2024
1 parent 4b04e7d commit db7c683
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ jobs:
with:
name: dist
path: dist/
pack:
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
Expand Down
11 changes: 9 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
FROM node:current-alpine as build

COPY . /app
WORKDIR /app

RUN npm install && npm run build

ARG EXPRESS_REPO
FROM ${EXPRESS_REPO}
FROM ${EXPRESS_REPO} as runner

COPY dist/* /app/public/
COPY --from=build /app/dist /app/public
RUN sed -i 's/next(createError(404));/res.status(404).sendFile(path.join(__dirname, "public", "index.html"));/' /app/app.js

0 comments on commit db7c683

Please sign in to comment.