- deploy/trader/{Dockerfile,entrypoint.sh}: node+python+twak image; restores the
wallet keystore from TWAK_WALLET_JSON_B64 at runtime, runs daily_trade.py --live
- render.yaml: add 'guardrail-trader' cron (12:00 UTC daily); env vars set in
dashboard (Render cron requires a paid plan; free tier is web-only)
- remove .github/workflows/daily-trade.yml + its secrets (avoid double-trading)
57 lines
1.9 KiB
YAML
57 lines
1.9 KiB
YAML
# Render Blueprint — deploys the read-only Guardrail Alpha backend API.
|
||
# Connect this repo at https://render.com (New → Blueprint); Render builds the
|
||
# Docker image from infra/Dockerfile.api and injects $PORT (the API's bind_addr
|
||
# honors PORT, so no host/port is hardcoded here).
|
||
#
|
||
# The API is read-only: it serves the dashboard from the SQLite event store.
|
||
# To populate it with live paper data, run the agent (locally or as a Render
|
||
# worker writing to the same disk) — see docs/LIVE_RUNBOOK.md.
|
||
services:
|
||
- type: web
|
||
name: guardrail-api
|
||
runtime: docker
|
||
repo: https://github.com/caelum0x/guardrail
|
||
branch: main
|
||
dockerfilePath: ./Dockerfile
|
||
dockerContext: .
|
||
plan: free
|
||
healthCheckPath: /health
|
||
autoDeploy: true
|
||
envVars:
|
||
- key: RUST_LOG
|
||
value: info
|
||
- key: DATABASE_URL
|
||
value: sqlite:///app/data/guardrail_alpha.db
|
||
# CORS origin for the Vercel dashboard (set to your dashboard URL).
|
||
- key: GUARDRAIL_API_CORS_ORIGIN
|
||
sync: false
|
||
disk:
|
||
name: guardrail-data
|
||
mountPath: /app/data
|
||
sizeGB: 1
|
||
|
||
# Track-1 autonomous trader — runs once a day during the live window.
|
||
# NOTE: Render Cron Jobs require a PAID plan (the free tier is web-only).
|
||
# Set the four env vars below in the Render dashboard (Environment → Secret).
|
||
# The trader's own window guard (June 22–28 in scripts/daily_trade.py) means
|
||
# runs outside the window are a safe no-op, so it can be deployed early.
|
||
- type: cron
|
||
name: guardrail-trader
|
||
runtime: docker
|
||
repo: https://github.com/caelum0x/guardrail
|
||
branch: main
|
||
dockerfilePath: ./deploy/trader/Dockerfile
|
||
dockerContext: .
|
||
schedule: "0 12 * * *" # 12:00 UTC daily
|
||
plan: starter
|
||
autoDeploy: true
|
||
envVars:
|
||
- key: TWAK_ACCESS_ID
|
||
sync: false
|
||
- key: TWAK_HMAC_SECRET
|
||
sync: false
|
||
- key: TWAK_WALLET_PASSWORD
|
||
sync: false
|
||
- key: TWAK_WALLET_JSON_B64
|
||
sync: false
|