14 lines
638 B
Bash
14 lines
638 B
Bash
#!/usr/bin/env bash
|
|
# FaaS/SCM entry point (copied to output/run.sh by build.sh → /opt/bytefaas/run.sh).
|
|
#
|
|
# Runtime artifacts mount at /opt/bytefaas, so this script and the compiled
|
|
# `server` binary sit side by side. `exec` replaces the shell with the server so
|
|
# the platform's SIGINT (graceful scale-down) reaches the Bun process directly —
|
|
# no wrapper in between to swallow it.
|
|
#
|
|
# The server reads the listen port from _BYTEFAAS_RUNTIME_PORT (FaaS-injected)
|
|
# and binds dual-stack (ipv4+ipv6). Set DATABASE_URL + other env in the platform
|
|
# env config — see control-server/build.sh header.
|
|
cd "$(dirname "$0")"
|
|
exec ./server
|