Skip to content

Commit

Permalink
chore: add nixpacks config
Browse files Browse the repository at this point in the history
  • Loading branch information
adisreyaj committed Apr 8, 2024
1 parent 67420d9 commit 9e77d7d
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/.angular/cache
node_modules
.env
dist
dist
.idea
39 changes: 39 additions & 0 deletions nixpacks.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
providers = ['node']
buildImage = 'ghcr.io/railwayapp/nixpacks:ubuntu-1707782610'

[variables]
CI = 'true'
NIXPACKS_METADATA = 'node'
NODE_ENV = 'production'
NIXPACKS_NX_APP_NAME = 'api'
NPM_CONFIG_PRODUCTION = 'false'
[phases.build]
dependsOn = ['install']
cmds = ['npm run build api']
cacheDirectories = ['node_modules/.cache']

[phases.install]
dependsOn = ['setup']
cmds = ['npm install']
cacheDirectories = [
'/root/.cache/Cypress',
'/root/.npm',
]
paths = ['/app/node_modules/.bin']

[phases.setup]
nixPkgs = [
'nodejs_18',
'npm-9_x',
'openssl',
]
nixLibs = [
'libuuid',
'libGL',
]
nixOverlays = ['https://github.com/railwayapp/nix-npm-overlay/archive/main.tar.gz']
nixpkgsArchive = 'bf744fe90419885eefced41b3e5ae442d732712d'

[start]
cmd = 'npm run start api'

0 comments on commit 9e77d7d

Please sign in to comment.