diff --git a/docker/nixpacks/install-node.sh b/docker/nixpacks/install-node.sh deleted file mode 100755 index 8355e4b..0000000 --- a/docker/nixpacks/install-node.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env bash -# Installs a pinned official Node.js build into /app/.node for the Railway -# (Nixpacks) build and links it into /usr/bin. Nixpacks' own Node comes from a -# nixpkgs snapshot that lags Node security releases, so we pin the release. -# To update: change NODE_VERSION and both hashes from -# https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt -set -euo pipefail - -NODE_VERSION="22.23.5" -case "$(uname -m)" in - x86_64) ARCH="x64"; SHA256="cdeb8670a0c81f51b4dc4ac61919f9b1ad917b304bf8221eb939570663d240f8" ;; - aarch64 | arm64) ARCH="arm64"; SHA256="2babb9eb5264860d540849f4b064a6fbdebcdc323657d9d382ce23d313fd5e09" ;; - *) echo "install-node: unsupported architecture $(uname -m)" >&2; exit 1 ;; -esac - -TARBALL="node-v${NODE_VERSION}-linux-${ARCH}.tar.xz" -DEST="/app/.node" -TMP="$(mktemp -d)" -trap 'rm -rf "$TMP"' EXIT - -curl -fsSL --retry 3 -o "$TMP/$TARBALL" "https://nodejs.org/dist/v${NODE_VERSION}/${TARBALL}" -echo "${SHA256} $TMP/$TARBALL" | sha256sum -c - - -rm -rf "$DEST" -mkdir -p "$DEST" -tar -xJf "$TMP/$TARBALL" -C "$DEST" --strip-components=1 - -# On the default PATH, so both build steps and the running server use it. -ln -sf "$DEST/bin/node" "$DEST/bin/npm" "$DEST/bin/npx" /usr/bin/ - -node -v diff --git a/nixpacks.toml b/nixpacks.toml deleted file mode 100644 index d16871b..0000000 --- a/nixpacks.toml +++ /dev/null @@ -1,21 +0,0 @@ -# Railway builds with Nixpacks. Its Node comes from a nixpkgs snapshot that lags -# Node security releases, so Node (and Nix's pnpm, which pulls in its own Node) -# isn't taken from Nix: docker/nixpacks/install-node.sh installs a pinned -# official release instead, used for both the build and the server. pnpm comes -# from corepack (packageManager in package.json). -# Update the version and hashes in that script with each Node security release. -[phases.setup] -nixPkgs = ["openssl"] - -[phases.node] -dependsOn = ["setup"] -cmds = ["bash docker/nixpacks/install-node.sh"] -# Only the script, so code changes don't redownload Node. -onlyIncludeFiles = ["docker/nixpacks/install-node.sh"] - -[phases.install] -dependsOn = ["node"] -cmds = [ - "npm install -g corepack@0.24.1 && ln -sf /app/.node/bin/corepack /usr/bin/corepack && corepack enable --install-directory /usr/bin", - "pnpm i --frozen-lockfile", -]