# Deployment Documentation

Deployment docs for the Chain 138 explorer stack.

## Read This First

For the current production deployment shape, start with [`LIVE_DEPLOYMENT_MAP.md`](./LIVE_DEPLOYMENT_MAP.md).

That file reflects the live split deployment now in production:

- Next frontend on `127.0.0.1:3000` via `solacescanscout-frontend.service`
- explorer config/API on `127.0.0.1:8081` via `explorer-config-api.service`
- Blockscout on `127.0.0.1:4000`
- token aggregation on `127.0.0.1:3001`
- static config assets under `/var/www/html/config`
- CCIP relay workers on host `r630-01`, outside VMID `5000`

## Current Canonical Deployment Paths

- Frontend deploy: [`scripts/deploy-next-frontend-to-vmid5000.sh`](../scripts/deploy-next-frontend-to-vmid5000.sh)
- Config deploy: [`scripts/deploy-explorer-config-to-vmid5000.sh`](../scripts/deploy-explorer-config-to-vmid5000.sh)
- Explorer config/API deploy: [`scripts/deploy-explorer-ai-to-vmid5000.sh`](../scripts/deploy-explorer-ai-to-vmid5000.sh)
- RPC/API-key edge enforcement: [`ACCESS_EDGE_ENFORCEMENT_RUNBOOK.md`](./ACCESS_EDGE_ENFORCEMENT_RUNBOOK.md)
- Public health audit: [`scripts/check-explorer-health.sh`](../scripts/check-explorer-health.sh)
- Full public smoke: [`check-explorer-e2e.sh`](../../scripts/verify/check-explorer-e2e.sh)

## Legacy And Greenfield Docs

The rest of this directory is still useful, but it should be treated as legacy scaffold or greenfield reference unless it explicitly matches the live split architecture above.

- `DEPLOYMENT_GUIDE.md`: older full-stack walkthrough
- `DEPLOYMENT_TASKS.md`: older monolithic deployment checklist
- `DEPLOYMENT_CHECKLIST.md`: older tracking checklist
- `QUICK_DEPLOY.md`: command reference for the legacy package

## Practical Rule

If the question is "how do we update production today?", use:

1. [`LIVE_DEPLOYMENT_MAP.md`](./LIVE_DEPLOYMENT_MAP.md)
2. the specific deploy script for the component being changed
3. the public health scripts for verification
