Skip to content

Add minimal Fly.io deployment tooling#53

Open
johannesmutter wants to merge 1 commit intomichael:mainfrom
johannesmutter:deployment-tooling-fly-io
Open

Add minimal Fly.io deployment tooling#53
johannesmutter wants to merge 1 commit intomichael:mainfrom
johannesmutter:deployment-tooling-fly-io

Conversation

@johannesmutter
Copy link

The goal of this PR is to add a simple deployment system (in this case for Fly.io). It's designed for Svelte developers who ship client sites regularly and want deployment to be a solved problem, without having to study lengthy deployment docs per provider.

The deploy script that was the inspirations for this in system606 was ~2000 LOC (interactive wizards, 25+ env vars, complex abstractions). For editable-website something much simpler is more suitable, that devs can understand, customize, and trust.

Design principles

  • Config as code — Secrets schema in deploy/config.js, values in gitignored .env.production
  • Platform files in rootfly.toml and Dockerfile must live in root (Fly.io requirement, same for Vercel/ Cloudflare), so we ship templates and copy on init. Adding it directly to repo would pollute the root folder and assume everyone has the same deployment target.
  • Validation before action — Check secrets and gitignore before any deploy
  • Let the platform do its job — Don't reinvent fly.toml in JavaScript; region/VM config stays in platform files
  • Beginner-friendly, expert-capable — Interactive prompts for first-timers, CLI flags for automation

What's included

deploy/
├── config.js              # Secrets schema (DB_PATH, ORIGIN). Svelte devs will adjust this file ✍️
├── deploy.js              # Main script (~200 lines). Most will not need to modify this.
└── templates/fly/
    ├── fly.toml           # Template with placeholders. 
    └── Dockerfile         # Simple Node.js container

scripts/
└── start.js               # Production entry with graceful shutdown

npm scripts:

  • deploy:init — First-time setup (creates fly.toml, Dockerfile, .env.production.example)
  • deploy — Validate secrets and deploy
  • deploy:secrets — Sync secrets to Fly.io

Future extensibility

Adding Vercel support would mean:

  1. Add deploy/templates/vercel/vercel.json
  2. Add vercel adapter to deploy/deploy.js
  3. Update deploy:init to ask which platform

The architecture supports this without major refactoring.

@vercel
Copy link

vercel bot commented Jan 22, 2026

@johannesmutter is attempting to deploy a commit to the Michael Aufreiter's projects Team on Vercel.

A member of the Team first needs to authorize it.

@johannesmutter johannesmutter force-pushed the deployment-tooling-fly-io branch from c2e8d16 to 088fa29 Compare January 22, 2026 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant