| name | flyio-core-workflow-b |
| description | Execute Fly.io secondary workflow: Postgres clusters, persistent volumes, and private networking.
Use when adding databases, persistent storage, or internal service communication.
Trigger: "fly postgres", "fly volumes", "fly.io database", "fly.io persistent storage".
|
| allowed-tools | Read, Write, Edit, Bash(fly:*), Bash(psql:*), Grep |
| version | 1.6.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","edge-compute","flyio"] |
| compatibility | Designed for Claude Code |
Fly.io Core Workflow B: Postgres, Volumes & Networking
Overview
Set up Fly Postgres, persistent Fly Volumes, and private networking between apps. Fly Postgres runs as a regular Fly app with automated replication. Volumes provide persistent NVMe storage attached to specific machines.
Instructions
Step 1: Create Fly Postgres
fly postgres create --name my-db --region iad --vm-size shared-cpu-1x --volume-size 10
fly postgres attach my-db -a my-app
fly postgres connect -a my-db
fly proxy 5432 -a my-db
Step 2: Create Persistent Volumes
fly volumes create data --size 10 --region iad -a my-app
fly volumes list -a my-app
[mounts]
source = "data"
destination = "/data"
fly deploy
fly ssh console -C "df -h /data"
Step 3: Private Networking (6PN)
DATABASE_URL=postgres://postgres:password@my-db.internal:5432/my_db
const dbUrl = ;
apiUrl = ;