From 5aa776d09e564254863cb3f3185c9bf1b754f411 Mon Sep 17 00:00:00 2001 From: Zed Spencer-Milnes Date: Thu, 5 Dec 2024 17:42:28 +0000 Subject: [PATCH] Upgrade to node 22 build and add workaround so devcontainers prefer ipv4 binding (fixes WSL compat, will break ipv6 only systems) --- .devcontainer/devcontainer.json | 4 ++-- .github/workflows/deploy.yml | 2 +- package.json | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index fc2f868..5378e42 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -3,7 +3,7 @@ { "name": "OKD Website Devcontainer", // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile - "image": "mcr.microsoft.com/devcontainers/javascript-node:20", + "image": "mcr.microsoft.com/devcontainers/javascript-node:22", "features": { "ghcr.io/devcontainers/features/github-cli:1": { "version": "latest" @@ -11,7 +11,7 @@ }, "updateContentCommand": "npm install", - "postAttachCommand": "npm start", + "postAttachCommand": "npm start-v4", // Use 'forwardPorts' to make a list of ports inside the container available locally. "forwardPorts": [3000], diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 740b897..916923c 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -15,7 +15,7 @@ jobs: fetch-depth: 0 - uses: actions/setup-node@v4 with: - node-version: 18 + node-version: 22 cache: npm - name: Install dependencies diff --git a/package.json b/package.json index 00c6c9e..48df1c1 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,7 @@ "scripts": { "docusaurus": "docusaurus", "start": "docusaurus start", + "start-v4": "docusaurus start -h 127.0.0.1", "build": "docusaurus build", "swizzle": "docusaurus swizzle", "deploy": "docusaurus deploy",