diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 9af080587f..c9ef161a02 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/vscode/devcontainers/typescript-node:20-bullseye +FROM mcr.microsoft.com/vscode/devcontainers/typescript-node:22-bullseye # Install sandbox RUN mkdir -p /app/sandbox/policy /app/sandbox/results \ diff --git a/.github/actions/setup-pnpm/action.yml b/.github/actions/setup-pnpm/action.yml index 55a6f4ec75..dccfb7a1a1 100644 --- a/.github/actions/setup-pnpm/action.yml +++ b/.github/actions/setup-pnpm/action.yml @@ -18,7 +18,7 @@ runs: - name: Setup Node.js and pnpm uses: actions/setup-node@v4 with: - node-version: 20 + node-version: 22 cache: 'pnpm' - name: Install dependencies diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 818388cec2..3883f24903 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -260,3 +260,18 @@ jobs: if: steps.filter.outputs.iris == 'true' run: go test ./... working-directory: ./apps/iris + + # TODO: write smoke test for backend + # e.g) start backend server and check if it responds to requests + # + # ``` + # pnpm --filter="@codedang/backend" start & + # + # for i in {1..10} + # do + # curl -s http://localhost:3000/health && exit 0 + # sleep 2 + # done + # echo "Server did not respond to health check." + # exit 1 + # ``` diff --git a/.gitpod.Dockerfile b/.gitpod.Dockerfile index 70851f3523..4462929b6f 100644 --- a/.gitpod.Dockerfile +++ b/.gitpod.Dockerfile @@ -1,5 +1,8 @@ FROM gitpod/workspace-full:latest +# Install Node.js +RUN nvm install v22.14.0 + # Install sandbox # FIXME: we don't need 777 permission RUN sudo mkdir -p /app/sandbox/policy /app/sandbox/results \ diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000000..7d41c735d7 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +22.14.0 diff --git a/apps/backend/Dockerfile b/apps/backend/Dockerfile index 5cafb40f32..d52c4e8e2c 100644 --- a/apps/backend/Dockerfile +++ b/apps/backend/Dockerfile @@ -5,7 +5,7 @@ ARG target=client ARG app_env=production -FROM node:20.18.0-alpine AS builder +FROM node:22.14.0-alpine AS builder ARG target # Install bash for swc-node @@ -24,7 +24,7 @@ RUN npx prisma generate RUN npm run build ${target} ### PRODUCTION ### -FROM node:20.18.0-alpine +FROM node:22.14.0-alpine ARG target ARG app_env diff --git a/package.json b/package.json index 0a2ba0d5ee..21a490685b 100644 --- a/package.json +++ b/package.json @@ -30,5 +30,8 @@ "typescript": "5.7.2", "typescript-eslint": "^8.18.1" }, - "packageManager": "pnpm@9.15.2" + "packageManager": "pnpm@9.15.2", + "engines": { + "node": "^22.14.0" + } }