_typedev
_typedev
RRailway
Created by _typedev on 11/3/2023 in #✋|help
Next 14 with bun 1.0.7
Hey there I'm wondering if I may get some clarification on how to correctly configure my Railway.json 1. What is the proper type for NIXPACKS_NO_CACHE I'm assuming it should be a string value of "1" in this case? 2. When adding a nixPkgsArchive I'm not seeing the proper version get installed. I've tried a few things 1. I assumed that maybe because I was passing "bun" in nixPkgs that it was interferring with the isntallation of the pckgArchive 2. I tried both ways and no lucj My assumption is that I'm not properly working with the cache. And ould appreciate any documentation you all may offer up so I may do may read up on it. Thanks!
{
"$schema": "https://railway.app/railway.schema.json",
"build": {
"builder": "NIXPACKS",
"watchPatterns": ["apps/next/**"],
"nixpacksPlan": {
"phases": {
"build": {
"cmds": ["bun run --cwd \"apps/next\" build"],
"dependsOn": ["install"],
"cacheDirectories": ["apps/next/.next/cache", "node_modules/.cache"]
},
"setup": {
"nixPkgs": ["nodejs_20", "bun"],
"nixOverlays": ["https://github.com/railwayapp/nix-npm-overlay/archive/main.tar.gz"],
"nixPkgsArchive": "a3d8834fae7c986033e72db669239cd9c1cedc96"
},
"install": {
"cmds": ["bun i"],
"paths": ["/app/node_modules/.bin"],
"dependsOn": ["setup"],
"cacheDirectories": ["/root/.bun"]
}
},
"providers": [],
"variables": {
"CI": "true",
"NODE_ENV": "production",
"NIXPACKS_METADATA": "node",
"NIXPACKS_NO_CACHE": "1",
"NPM_CONFIG_PRODUCTION": "false"
},
"buildImage": "ghcr.io/railwayapp/nixpacks:ubuntu-1697500996"
}
},
"deploy": {
"startCommand": "bun run --cwd \"apps/next\" start",
"numReplicas": 1,
"sleepApplication": false,
"restartPolicyType": "ON_FAILURE",
"restartPolicyMaxRetries": 10
}
}
{
"$schema": "https://railway.app/railway.schema.json",
"build": {
"builder": "NIXPACKS",
"watchPatterns": ["apps/next/**"],
"nixpacksPlan": {
"phases": {
"build": {
"cmds": ["bun run --cwd \"apps/next\" build"],
"dependsOn": ["install"],
"cacheDirectories": ["apps/next/.next/cache", "node_modules/.cache"]
},
"setup": {
"nixPkgs": ["nodejs_20", "bun"],
"nixOverlays": ["https://github.com/railwayapp/nix-npm-overlay/archive/main.tar.gz"],
"nixPkgsArchive": "a3d8834fae7c986033e72db669239cd9c1cedc96"
},
"install": {
"cmds": ["bun i"],
"paths": ["/app/node_modules/.bin"],
"dependsOn": ["setup"],
"cacheDirectories": ["/root/.bun"]
}
},
"providers": [],
"variables": {
"CI": "true",
"NODE_ENV": "production",
"NIXPACKS_METADATA": "node",
"NIXPACKS_NO_CACHE": "1",
"NPM_CONFIG_PRODUCTION": "false"
},
"buildImage": "ghcr.io/railwayapp/nixpacks:ubuntu-1697500996"
}
},
"deploy": {
"startCommand": "bun run --cwd \"apps/next\" start",
"numReplicas": 1,
"sleepApplication": false,
"restartPolicyType": "ON_FAILURE",
"restartPolicyMaxRetries": 10
}
}
17 replies