correction du nixpack pour supprimer les fichiers sources
This commit is contained in:
@@ -1,10 +1,19 @@
|
||||
[phases.setup]
|
||||
nixPkgs = ["nodejs_22", "openssl"]
|
||||
|
||||
[phases.install]
|
||||
cmds = ["npm install"]
|
||||
|
||||
[phases.build]
|
||||
cmds = [
|
||||
"npm run build",
|
||||
"mkdir -p .next/standalone/public",
|
||||
"cp -r public/* .next/standalone/public/ || true",
|
||||
"cp -r .next/static .next/standalone/.next/static"
|
||||
# On prépare le standalone avec ses assets
|
||||
"cp -r public .next/standalone/public",
|
||||
"cp -r .next/static .next/standalone/.next/static",
|
||||
# NETTOYAGE RADICAL : on supprime tout sauf le standalone
|
||||
"find . -maxdepth 1 ! -name '.next' ! -name '.' -exec rm -rf {} +"
|
||||
]
|
||||
|
||||
[phases.setup]
|
||||
nixPkgs = ["nodejs_22", "npm-9_x", "openssl"]
|
||||
[start]
|
||||
# On lance le serveur depuis le dossier standalone
|
||||
cmd = "node .next/standalone/server.js"
|
||||
Reference in New Issue
Block a user