rubenpenap/epic-stack-agent-skills
Overview
This skill guides deployment of the Epic Stack to Fly.io, covering multi-region setup, LiteFS volumes, healthchecks, and CI/CD with GitHub Actions. It packs practical commands, configuration snippets, and operational patterns to achieve zero-downtime deploys and safe database migrations. Use it to standardize deployments, secrets management, and multi-region replication.
How this skill works
The skill inspects Fly.io configuration and provides recommended fly.toml and litefs.yml patterns that coordinate primary region, mounts, and mounts-backed volumes. It outlines healthcheck endpoints, Consul setup for leader election, and LiteFS exec hooks so migrations run only on the primary. It also includes GitHub Actions workflows and local Docker examples to integrate CI/CD and preview deployments.
When to use it
- Setting up a new Epic Stack app on Fly.io
- Configuring multi-region deployments and read replicas
- Implementing zero-downtime deploys and healthchecks
- Configuring LiteFS volumes and primary-only migrations
- Creating CI/CD pipelines and preview deployments with GitHub Actions
Best practices
- Keep primary_region consistent across fly.toml, volume region, and PRIMARY_REGION env var
- Run migrations only on the primary instance (LiteFS if-candidate pattern)
- Define healthchecks that verify DB and application readiness before routing traffic
- Keep commits deployable and PRs small and short-lived
- Store secrets with fly secrets and GitHub Secrets; never commit tokens
Example use cases
- Initial production setup: create apps, volumes, attach Consul, set secrets, then deploy
- Multi-region deployment: scale primary for writes and replicas in other regions for read-only traffic
- CI/CD: GitHub Actions deploy to production from main and staging from dev with flyctl
- Preview deployments: per-PR preview apps created by workflow and URL posted as comment
- Local development: build and run Docker image with LITEFS mount and session secrets
FAQ
Use LiteFS lease candidate logic and exec entries in litefs.yml with if-candidate: true so only the promoted primary runs npx prisma migrate deploy.
What if my primary_region is inconsistent with the volume region?
Deploys and LiteFS require the primary_region to match the data volume region; update fly.toml and recreate or move the volume to align regions before deploy.
7 skills
This skill guides deployment on Fly.io with multi-region setup and GitHub Actions CI/CD for Epic Stack.
This skill guides Epic Stack authentication, sessions, OAuth, 2FA, and passkeys to secure sign-in and account management.
This skill helps you implement and manage caching with cachified, SQLite and LRU caches to boost Epic Stack performance.
This skill guides you through Epic Stack routing with file-based conventions, loaders, actions, and parameter handling for clean, scalable apps.
This skill guides you in implementing Epic Stack security practices including CSP, honeypots, rate limiting, and secure sessions to harden apps.
This skill helps you design Prisma schemas, migrations, and SQLite with LiteFS for Epic Stack, focusing on efficient queries and multi-region readiness.
This skill helps you implement and validate RBAC permissions in Epic Stack with explicit checks and owner versus any access.