Production runs on a single VPS behind nginx, two pm2 processes:Documentation Index
Fetch the complete documentation index at: https://docs.signalium.site/llms.txt
Use this file to discover all available pages before exploring further.
| Domain | Process | Local port |
|---|---|---|
signalium.site | signalium-web | 8040 |
api.signalium.site | signalium-api | 8041 |
CI/CD
Push tomain triggers .github/workflows/cd.yml:
- verify job (GitHub-hosted Ubuntu):
pnpm install --frozen-lockfile, thenpnpm typecheckandpnpm lintscoped to runtime packages (skips@signalium/contractswhich needs Foundry and@signalium/subgraphwhich needsgraph-clicodegen). - deploy job: SSHes to the VPS using a deploy-only ed25519 key, runs
git fetch && reset --hard origin/main,pnpm install --frozen-lockfile --prefer-offline,pnpm build --filter=@signalium/web --filter=@signalium/api, thenpm2 reload ecosystem.config.cjs --update-env.
Required GitHub Actions secrets
| Secret | Value |
|---|---|
VPS_HOST | hostname or IP of the VPS |
VPS_USER | ssh user |
VPS_SSH_KEY | full contents of an ed25519 private key whose pub key is in ~/.ssh/authorized_keys on the VPS |
VPS_PATH | absolute repo path on the VPS, e.g. /home/cuyvps/signalium |
First-time bootstrap
Walks through cloning, env setup, pm2 init, nginx vhosts, and certbot. Lives indeploy/README.md. Highlights:
pm2 ecosystem
ecosystem.config.cjs declares both processes. Key gotcha: interpreter: 'none' is required so pm2 doesn’t try to fork the pnpm shell wrapper as a Node script.
SQLite cache
The API’s SQLite db lives atapps/api/data/signalium.db and holds the X post metadata cache, AI proposals (keyed by judgeStorageRoot), and the 0G/USD price cache. The CD workflow never touches this directory — apps/api/data/ is gitignored, so production state is preserved across deploys.
If the production DB needs a backfill (e.g., proposals created locally need to flow to prod), checkpoint the local WAL with sqlite3 apps/api/data/signalium.db "PRAGMA wal_checkpoint(TRUNCATE);" and scp the file after stopping the API process.
