From 88a5014dfde6946b98513e0ced7a9461ef7cc7a3 Mon Sep 17 00:00:00 2001 From: Niccolo Borgioli Date: Wed, 18 Dec 2024 23:22:03 +0100 Subject: [PATCH] also cache astro files --- nixpacks.json | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 nixpacks.json diff --git a/nixpacks.json b/nixpacks.json new file mode 100644 index 0000000..d8aedfc --- /dev/null +++ b/nixpacks.json @@ -0,0 +1,27 @@ +{ + "variables": { + "CI": "true", + "NIXPACKS_METADATA": "node", + "NODE_ENV": "production", + "NPM_CONFIG_PRODUCTION": "false" + }, + "phases": { + "build": { + "dependsOn": ["install"], + "cmds": ["pnpm run build"], + "cacheDirectories": ["node_modules/.cache", "node_modules/.astro"] + }, + "install": { + "dependsOn": ["setup"], + "cmds": ["npm install -g corepack@0.24.1 && corepack enable", "pnpm i --frozen-lockfile"], + "cacheDirectories": ["/root/.local/share/pnpm/store/v3"], + "paths": ["/app/node_modules/.bin"] + }, + "setup": { + "nixPkgs": ["nodejs_22"] + } + }, + "start": { + "cmd": "pnpm run preview" + } +}