Staging Deployment¶
Staging environment mirrors production architecture using public testnet (Chain ID 8847) — safe for pre-production testing.
Staging vs Production¶
| Staging | Production | |
|---|---|---|
| Chain ID | 8847 | 8846 |
| Network | Public testnet | Mainnet |
| Domain | *.staging.garudachain.id |
*.garudachain.id |
| Faucet | Enabled | Disabled |
| Keys | Test keys OK | HSM only |
URLs¶
| Service | URL |
|---|---|
| RPC | https://rpc.staging.garudachain.id |
| Explorer | https://explorer.staging.garudachain.id |
| API | https://api.staging.garudachain.id |
| Faucet | https://faucet.staging.garudachain.id |
| Status | https://status.staging.garudachain.id |
| Grafana | https://grafana.staging.garudachain.id |
Quick Start¶
# 1. Configure
cp .env.staging.example .env.staging
# Set STAGING_HOST, ACME_EMAIL
# 2. DNS A records → staging server IP
npm run staging:verify-dns
# 3. Deploy (with monitoring)
npm run staging:deploy
# 4. Smoke tests
npm run staging:smoke
# 5. Deploy testnet contracts
npm run contracts:deploy:public
Deploy Options¶
# Staging only
docker compose -f docker-compose.public.yml -f docker-compose.staging.yml up -d --build
# Staging + monitoring
bash scripts/staging/deploy.sh --with-monitoring
Workflow¶
- Develop & test locally (
npm run public:up) - Deploy to staging → run smoke tests
- Run security audit (
npm run security:test) - Promote to production (
npm run prod:deploy)
DNS Records¶
rpc.staging.garudachain.id → <STAGING_IP>
api.staging.garudachain.id → <STAGING_IP>
explorer.staging.garudachain.id → <STAGING_IP>
faucet.staging.garudachain.id → <STAGING_IP>
status.staging.garudachain.id → <STAGING_IP>
grafana.staging.garudachain.id → <STAGING_IP>
docs.staging.garudachain.id → <STAGING_IP>
Grafana (Staging)¶
Default credentials: admin / value of GRAFANA_ADMIN_PASSWORD in .env.staging
Change password immediately after first login.