Skip to content

Commit

Permalink
chore: add nixpacks
Browse files Browse the repository at this point in the history
  • Loading branch information
adisreyaj committed Apr 11, 2024
1 parent 057b557 commit 21963f1
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions nixpacks.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
providers = []
buildImage = 'ghcr.io/railwayapp/nixpacks:ubuntu-1707782610'

[variables]
CI = 'true'
NIXPACKS_METADATA = 'node'
NODE_ENV = 'production'
NPM_CONFIG_PRODUCTION = 'false'
NIXPACKS_NX_APP_NAME = 'api'

[phases.build]
dependsOn = ['install']
cmds = ['npm install --legacy-peer-deps', 'npm run postinstall', 'npm run prisma:migrate:prod']
cacheDirectories = ['node_modules/.cache']

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

[phases.setup]
nixPkgs = [
'nodejs_18',
'npm-6_x',
'openssl',
'python311'
]
nixLibs = [
'libuuid',
'libGL',
]
aptPkgs = ['build-essential']

nixOverlays = ['https://github.com/railwayapp/nix-npm-overlay/archive/main.tar.gz']
nixpkgsArchive = 'bf744fe90419885eefced41b3e5ae442d732712d'

[start]
cmd = 'npm start api'

0 comments on commit 21963f1

Please sign in to comment.