feat: add flyio deployment and document#1
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds first-class Fly.io deployment support for Bucketeer as an alternative to the existing AWS ECS/Terraform setup, including new Fly app configs, a full deploy script, and Dockerfile/version refactors to standardize image versioning.
Changes:
- Introduces a Fly.io deployment workflow (fly.toml configs,
flyio/deploy.sh, and Make targets) including MySQL-on-volume and Upstash Redis provisioning. - Refactors service Dockerfiles to use
ARG BUCKETEER_VERSIONand adds Fly-specific runtime helpers (resolve-hosts.sh, Redis auth proxy viasocat). - Updates AWS Terraform/scripts and README documentation to align around a single Bucketeer version variable and document both deployment options.
Reviewed changes
Copilot reviewed 30 out of 30 changed files in this pull request and generated 23 comments.
Show a summary per file
| File | Description |
|---|---|
| services/web/entrypoint.sh | Adds Fly DNS pre-resolution + Redis AUTH proxy setup for web service. |
| services/web/Dockerfile | Uses BUCKETEER_VERSION for upstream image; installs socat; bundles resolve-hosts.sh. |
| services/subscriber/entrypoint.sh | Adds Fly DNS pre-resolution + Redis AUTH proxy and config rewrite. |
| services/subscriber/Dockerfile | Switches to BUCKETEER_VERSION upstream image for subscriber. |
| services/nginx/Dockerfile | Makes nginx config selectable via NGINX_CONF build arg. |
| services/mysql/init-db/mysql_dump.sql | Adds MySQL bootstrap dump for Fly MySQL container initialization. |
| services/mysql/Dockerfile | Adds a MySQL image that seeds schema/data via init script and config. |
| services/batch/entrypoint.sh | Adds Fly DNS pre-resolution + Redis AUTH proxy setup for batch service. |
| services/batch/Dockerfile | Uses BUCKETEER_VERSION for upstream image; installs socat; bundles resolve-hosts.sh. |
| services/api/entrypoint.sh | Adds Fly DNS pre-resolution + Redis AUTH proxy setup for API service. |
| services/api/Dockerfile | Uses BUCKETEER_VERSION for upstream image; installs socat; bundles resolve-hosts.sh. |
| flyio/web/fly.toml | Defines Fly app config for web service. |
| flyio/subscriber/fly.toml | Defines Fly app config for subscriber service. |
| flyio/resolve-hosts.sh | Adds helper to pre-resolve .internal hostnames into /etc/hosts. |
| flyio/nginx/fly.toml | Defines Fly app config for nginx edge proxy. |
| flyio/mysql/fly.toml | Defines Fly app config for MySQL w/ persistent volume. |
| flyio/migration/fly.toml | Defines Fly app config for migration runner. |
| flyio/httpstan/fly.toml | Defines Fly app config for HTTPStan service. |
| flyio/deploy.sh | Adds end-to-end idempotent Fly deployment script (apps, IPs, Redis, secrets, builds, migrations, deploys). |
| flyio/config.env.example | Adds example Fly deployment configuration (prefix/region/version/creds). |
| flyio/batch/fly.toml | Defines Fly app config for batch service. |
| flyio/batch-cron/fly.toml | Defines Fly app config for batch-cron service. |
| flyio/api/fly.toml | Defines Fly app config for global anycast API service and public ports. |
| config/nginx/bucketeer-flyio.conf | Adds Fly-specific nginx config (private DNS resolver + internal gRPC proxying). |
| aws/terraform-config/config.tfvars.template | Updates template to use bucketeer_version instead of image/migration tags. |
| aws/push-ecr.sh | Adds BUCKETEER_VERSION build arg support for AWS image builds. |
| aws/modules/vars.tf | Consolidates image tag variables into single bucketeer_version. |
| aws/modules/ecs.tf | Updates ECS task definitions to use bucketeer_version for all images incl. migration. |
| README.md | Documents Fly architecture/costs/commands; updates AWS docs and quick reference. |
| Makefile | Adds Fly targets for deploy/destroy/ips/logs/certs/redis provisioning. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add Fly.io deployment support
Deploy Bucketeer to Fly.io as an alternative to the existing AWS ECS setup. Significantly cheaper (~$34/mo vs ~$79/mo on AWS)
What's included
flyio/deploy.sh) — idempotent, handles app creation, IP allocation, secrets, image builds, database migration, and service deployment in one passAPI_REGIONS), so SDKs connect to the nearest instancefly redis create, with asocatpre-auth proxy in each service entrypoint (Bucketeer v2.2.0 binaries lack native Redis password support)make gen-certs-flyio) with.internalSANs for Fly.io's private DNS--baselinedetection for first-time deploysBUCKETEER_VERSION) flows through Dockerfiles (via build arg), deploy script, and migration — change it in one place to upgradeOther changes
ARG BUCKETEER_VERSIONinstead of hardcoded tagsbucketeer_image_tag+bucketeer_migration_taginto a singlebucketeer_versionvariableMake targets
deploy-flyiodestroy-flyioip-flyiologs-flyio