From 68c5847ed0d0635c4ea567ce83441cb0ebcc23a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=BE=E3=81=A3=E3=81=A1=E3=82=83=E3=81=A8=E3=83=BC?= =?UTF-8?q?=E3=81=AB=E3=82=85?= <17376330+u1-liquid@users.noreply.github.com> Date: Tue, 21 Nov 2023 04:37:44 +0900 Subject: [PATCH] spec(deps): use node 20 (MisskeyIO#197) --- .devcontainer/devcontainer.json | 6 ++---- .github/workflows/test-backend.yml | 2 +- .github/workflows/test-frontend.yml | 4 ++-- .github/workflows/test-misskey-js.yml | 2 +- .github/workflows/test-production.yml | 2 +- .node-version | 2 +- Dockerfile | 5 +++-- 7 files changed, 11 insertions(+), 12 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 0583a6696..d0689667a 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -4,11 +4,9 @@ "service": "app", "workspaceFolder": "/workspace", "features": { - "ghcr.io/devcontainers-contrib/features/pnpm:2": { - "version": "8.9.2" - }, + "ghcr.io/devcontainers-contrib/features/pnpm:2": {}, "ghcr.io/devcontainers/features/node:1": { - "version": "20.5.1" + "version": "20" } }, "forwardPorts": [3000], diff --git a/.github/workflows/test-backend.yml b/.github/workflows/test-backend.yml index 24d3d7615..3628d762d 100644 --- a/.github/workflows/test-backend.yml +++ b/.github/workflows/test-backend.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: - node-version: [20.5.1] + node-version: [20.x] services: postgres: diff --git a/.github/workflows/test-frontend.yml b/.github/workflows/test-frontend.yml index dba4b8a60..59e243c80 100644 --- a/.github/workflows/test-frontend.yml +++ b/.github/workflows/test-frontend.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: - node-version: [20.5.1] + node-version: [20.x] steps: - uses: actions/checkout@v4.1.1 @@ -51,7 +51,7 @@ jobs: strategy: fail-fast: false matrix: - node-version: [20.5.1] + node-version: [20.x] browser: [chrome] services: diff --git a/.github/workflows/test-misskey-js.yml b/.github/workflows/test-misskey-js.yml index ae1ddf31d..3e880b57e 100644 --- a/.github/workflows/test-misskey-js.yml +++ b/.github/workflows/test-misskey-js.yml @@ -16,7 +16,7 @@ jobs: strategy: matrix: - node-version: [20.5.1] + node-version: [20.x] # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ steps: diff --git a/.github/workflows/test-production.yml b/.github/workflows/test-production.yml index d9bfb12be..46038173c 100644 --- a/.github/workflows/test-production.yml +++ b/.github/workflows/test-production.yml @@ -16,7 +16,7 @@ jobs: strategy: matrix: - node-version: [20.5.1] + node-version: [20.x] steps: - uses: actions/checkout@v4.1.1 diff --git a/.node-version b/.node-version index 7cc206998..209e3ef4b 100644 --- a/.node-version +++ b/.node-version @@ -1 +1 @@ -20.5.1 +20 diff --git a/Dockerfile b/Dockerfile index b204965d4..33eb8e486 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ # syntax = docker/dockerfile:1.4 -ARG NODE_VERSION=20.5.1-bullseye +ARG NODE_VERSION=20 # build assets & compile TypeScript @@ -68,7 +68,7 @@ ARG GID="991" RUN apt-get update \ && apt-get install -y --no-install-recommends \ - ffmpeg tini curl libjemalloc-dev libjemalloc2 \ + ffmpeg tini curl libjemalloc2 \ && ln -s /usr/lib/$(uname -m)-linux-gnu/libjemalloc.so.2 /usr/local/lib/libjemalloc.so \ && corepack enable \ && groupadd -g "${GID}" misskey \ @@ -89,6 +89,7 @@ COPY --chown=misskey:misskey --from=native-builder /misskey/fluent-emojis /missk COPY --chown=misskey:misskey . ./ ENV LD_PRELOAD=/usr/local/lib/libjemalloc.so +ENV MALLOC_CONF=background_thread:true,metadata_thp:auto,dirty_decay_ms:30000,muzzy_decay_ms:30000 ENV NODE_ENV=production HEALTHCHECK --interval=5s --retries=20 CMD ["/bin/bash", "/misskey/healthcheck.sh"] ENTRYPOINT ["/usr/bin/tini", "--"]