Deploy to Fly.io
Build the image, import it into Fly, set secrets, deploy.
1. Build
axon build
# → .agent/image.tar
2. Create a Fly app
fly auth login
fly apps create my-agent
3. Import the image
docker load < .agent/image.tar
docker tag my-agent registry.fly.io/my-agent:latest
fly auth docker
docker push registry.fly.io/my-agent:latest
4. Write a fly.toml
Create fly.toml in the agent directory. Set app to your app name, internal_port to 3000, and choose a primary_region close to your users (e.g. lhr for London, iad for US East):
cat > fly.toml << 'EOF'
app = "my-agent"
primary_region = "lhr"
[build]
image = "registry.fly.io/my-agent:latest"
[http_service]
internal_port = 3000
force_https = true
[[vm]]
memory = "512mb"
cpus = 1
EOF
5. Set secrets
fly secrets set AXON_API_KEY=axon_...
fly secrets set GITHUB_TOKEN=ghp_... # any keys your agent needs
6. Deploy
fly deploy
Fly prints your app URL when the deployment completes.