2.3 KiB
2.3 KiB
Podman Staging Environment
The Podman stack mirrors scripts/dev.sh using long-lived containers. Every boot spins up a fresh Base Sepolia fork, redeploys contracts, seeds liquidity, and launches the live-reload services behind Caddy on port 80.
Service Topology
anvil– Base Sepolia fork with optional mnemonic fromonchain/.secret.localbootstrap– one-shot job runningDeployLocal.sol, seeding liquidity, priming blocks, and writing shared env filesponder–npm run devfor the indexer (port 42069 inside the pod)frontend– Vite dev server forweb-app(port 5173 inside the pod)txn-bot– automation loop plus Express status API (port 43069 inside the pod)caddy– front door athttp://<host>:80, routing/api/graphql,/health,/api/rpc, and/api/txnto the internal services
All containers mount the repository so code edits hot-reload exactly as the local script. Named volumes keep node_modules caches between restarts.
Prerequisites
- Podman 4.x (rootless recommended)
podman-compose
Launching
podman-compose -f podman-compose.yml build
podman-compose -f podman-compose.yml up
- First run takes several minutes while Foundry installs deps, deploys contracts, and runs the seeding transactions.
- Use
podman-compose downto stop. Bring-up always redeploys and rewritesservices/ponder/.env.localplustmp/podman/txnBot.env.
Access Points (via Caddy)
- Frontend:
http://<host>/ - GraphQL:
http://<host>/api/graphql - RPC passthrough:
http://<host>/api/rpc - Txn bot status:
http://<host>/api/txn/status
Configuration Knobs
Set environment variables before podman-compose up:
FORK_URL– Anvil upstream RPC (defaults tohttps://sepolia.base.org)DEPLOYER_PK,DEPLOYER_ADDR– override deployer wallet; otherwise derived from.secret.localor Foundry defaultsTXNBOT_PRIVATE_KEY,TXNBOT_ADDRESS,TXNBOT_FUND_VALUE– customise bot signer and funding
Edit containers/Caddyfile if you need different routes or ports.
Known Limitations
- State is ephemeral; every restart wipes the fork and redeploys contracts.
- Processes run in dev/watch mode (
npm run dev), so staging traffic is not production hardened. - Secrets live in env files inside the repo mount because no external secret store is wired in.