mishig HF Staff commited on
Commit
9ff732c
·
1 Parent(s): af0a419

fix: use environment variables for HOST/PORT instead of CLI args

Browse files

SvelteKit's Node adapter reads HOST and PORT from environment variables,
not command line arguments. This was causing the server to not bind
to the correct port, failing the HuggingFace Spaces healthcheck.

Files changed (1) hide show
  1. entrypoint.sh +3 -1
entrypoint.sh CHANGED
@@ -15,5 +15,7 @@ if [ "$INCLUDE_DB" = "true" ] ; then
15
  fi;
16
 
17
  export PUBLIC_VERSION=$(node -p "require('./package.json').version")
 
 
18
 
19
- dotenv -e /app/.env -c -- node --dns-result-order=ipv4first /app/build/index.js -- --host 0.0.0.0 --port 3000
 
15
  fi;
16
 
17
  export PUBLIC_VERSION=$(node -p "require('./package.json').version")
18
+ export HOST=0.0.0.0
19
+ export PORT=3000
20
 
21
+ dotenv -e /app/.env -c -- node --dns-result-order=ipv4first /app/build/index.js