Skip to content

Commit 30176e6

Browse files
feat: migrate dockerfile to use node v24 with alpine + update github actions
1 parent 380b22a commit 30176e6

5 files changed

Lines changed: 18 additions & 18 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
demo: ${{ steps.filter.outputs.demo }}
2121
shared: ${{ steps.filter.outputs.shared }}
2222
steps:
23-
- uses: actions/checkout@v4
23+
- uses: actions/checkout@v5
2424
- uses: dorny/paths-filter@v3
2525
id: filter
2626
with:
@@ -45,15 +45,15 @@ jobs:
4545
if: ${{ needs.changes.outputs.shared == 'true' || needs.changes.outputs.demo == 'true' }}
4646
runs-on: ubuntu-latest
4747
steps:
48-
- uses: actions/checkout@v4
48+
- uses: actions/checkout@v5
4949
- uses: docker/setup-qemu-action@v3
5050
- uses: docker/setup-buildx-action@v3
5151
- uses: docker/login-action@v3
5252
with:
5353
username: ${{ secrets.DOCKERHUB_USERNAME }}
5454
password: ${{ secrets.DOCKERHUB_TOKEN }}
5555

56-
- uses: docker/build-push-action@v5
56+
- uses: docker/build-push-action@v6
5757
timeout-minutes: 30
5858
with:
5959
pull: true
@@ -70,7 +70,7 @@ jobs:
7070
runs-on: ubuntu-latest
7171

7272
steps:
73-
- uses: actions/checkout@v4
73+
- uses: actions/checkout@v5
7474
- name: Prepare
7575
uses: appleboy/ssh-action@master
7676
with:

.github/workflows/standard-version.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515

1616
steps:
1717
# Checkout action retreive the source (git clone)
18-
- uses: actions/checkout@v4
18+
- uses: actions/checkout@v5
1919
with:
2020
fetch-depth: 0 # needed to retreive all git history
2121
token: ${{ secrets.APP_GITHUB_TOKEN }}
@@ -26,7 +26,7 @@ jobs:
2626
# Setup pnpm with cache
2727
- uses: actions/setup-node@v4
2828
with:
29-
node-version: 22
29+
node-version: 24
3030
cache: pnpm
3131

3232
# Run "standard-version", which may create a new tag

Dockerfile

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
FROM bitnami/node:22.14.0 AS base
1+
FROM node:24.5.0-alpine3.22 AS base
22
ENV PNPM_HOME="/pnpm"
33
ENV PATH="$PNPM_HOME:$PATH"
4-
RUN corepack enable
4+
RUN corepack enable && corepack prepare pnpm@10.14.0 --activate
55

66
FROM base AS install
77
COPY . /build
@@ -14,11 +14,8 @@ RUN --mount=type=cache,id=pnpm,target=/pnpm/store NODE_OPTIONS=--max-old-space-s
1414

1515
FROM base AS demo
1616
ENV NODE_ENV=production
17-
RUN groupadd -g 10101 nuxt \
18-
&& useradd -u 11001 -g nuxt nuxt \
19-
&& chown -R nuxt:nuxt /app
20-
USER nuxt:nuxt
21-
COPY --chown=nuxt:nuxt --from=build-demo /build/.demo/.output /prod/demo/.output
17+
USER node:node
18+
COPY --chown=node:node --from=build-demo /build/.demo/.output /prod/demo/.output
2219
WORKDIR /prod/demo
2320
EXPOSE 3000
2421
CMD ["node", ".output/server/index.mjs"]

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"type": "module",
44
"version": "2.0.0",
55
"private": true,
6-
"packageManager": "pnpm@10.5.2",
6+
"packageManager": "pnpm@10.14.0",
77
"main": "./nuxt.config.ts",
88
"engines": {
99
"node": ">=22",

pnpm-lock.yaml

Lines changed: 7 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)