Skip to content

New files from Fly.io Launch#4

Open
daekydev wants to merge 2 commits intosubinps:mainfrom
daekydev:flyio-new-files
Open

New files from Fly.io Launch#4
daekydev wants to merge 2 commits intosubinps:mainfrom
daekydev:flyio-new-files

Conversation

@daekydev
Copy link
Copy Markdown

@daekydev daekydev commented Apr 8, 2026

Summary by CodeRabbit

  • Chores
    • Added deployment configuration for Fly.io: HTTPS enforcement, HTTP service limited to the app process, machine lifecycle controls (auto-start/stop, min running machines), and a VM sizing profile (1 GB memory, shared CPU). Build now uses a Docker-based workflow.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 8, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e4b3209f-f72c-4996-acce-01f07e4ed902

📥 Commits

Reviewing files that changed from the base of the PR and between 9c5d132 and 986fc28.

📒 Files selected for processing (1)
  • fly.toml
✅ Files skipped from review due to trivial changes (1)
  • fly.toml

📝 Walkthrough

Walkthrough

A Fly.io deployment configuration file (fly.toml) is added for the teleplay app, targeting the ams region, exposing internal port 8000 with HTTPS enforced, configuring machine lifecycle (auto-stop/start, min_machines_running = 0), and specifying a 1GB shared-CPU VM.

Changes

Cohort / File(s) Summary
Fly.io Deployment Configuration
fly.toml
Added Fly.io config for teleplay: primary_region = "ams", build using Dockerfile, [http_service] with internal_port = 8000, force_https = true, processes = ['app'], machine lifecycle settings (auto_stop_machines = 'stop', auto_start_machines = true, min\_machines\_running = 0), and a [[vm]] stanza with memory = '1gb', cpu_kind = 'shared', cpus = 1.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A tiny config hopped on the scene,
Amsterdam dreams in a Docker machine,
Port eight-thousand with HTTPS bright,
Auto-start and stop keep the costs light,
Ready to fly into morning light ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'New files from Fly.io Launch' accurately describes the main change—adding a new fly.toml configuration file from Fly.io deployment setup.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Author

@daekydev daekydev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect

@daekydev daekydev marked this pull request as draft April 8, 2026 20:48
@daekydev daekydev marked this pull request as ready for review April 8, 2026 20:49
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
fly.toml (1)

14-16: Consider keeping one warm machine for production latency.

With min_machines_running = 0, first-request cold starts are expected after idle periods. If this serves interactive traffic, consider min_machines_running = 1.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@fly.toml` around lines 14 - 16, The current Fly configuration sets
auto_stop_machines = 'stop', auto_start_machines = true and min_machines_running
= 0 which allows full scale-to-zero and causes cold starts; change
min_machines_running from 0 to 1 to keep one warm instance for
production/interative latency-sensitive traffic so the app avoids first-request
cold starts while leaving auto-stop/start behavior intact.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@fly.toml`:
- Around line 20-23: The fly.toml currently defines both memory and memory_mb in
the VM config, which is unsupported; remove the memory_mb = 1024 entry so only
memory = '1gb' remains, leaving cpu_kind and cpus unchanged; update any comments
or related documentation referencing memory_mb and ensure no other code or
scripts rely on memory_mb instead of memory.

---

Nitpick comments:
In `@fly.toml`:
- Around line 14-16: The current Fly configuration sets auto_stop_machines =
'stop', auto_start_machines = true and min_machines_running = 0 which allows
full scale-to-zero and causes cold starts; change min_machines_running from 0 to
1 to keep one warm instance for production/interative latency-sensitive traffic
so the app avoids first-request cold starts while leaving auto-stop/start
behavior intact.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d233c3dd-b550-4257-9964-2060f823ee86

📥 Commits

Reviewing files that changed from the base of the PR and between 742a7a1 and 9c5d132.

📒 Files selected for processing (1)
  • fly.toml

Comment on lines +20 to +23
memory = '1gb'
cpu_kind = 'shared'
cpus = 1
memory_mb = 1024
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

In Fly.io fly.toml [[vm]] configuration, can memoryandmemory_mb be set together? If both are present, which one takes precedence, and is this officially supported?

💡 Result:

Yes—flyctl will accept both memory and memory_mb in a [[vm]] stanza, because [[vm]] is decoded into a Compute struct that has both a memory field and an inlined MachineGuest (which includes memory_mb). The config reference, however, documents only memory for the [[vm]] section. [1]

If both are present, which wins?

In flyctl’s computeToGuest() implementation, it:

  1. Parses memory (string with units) and sets guest.MemoryMB, then
  2. Copies fields from compute.MachineGuest (where memory_mb lives) onto guest afterwards (with “ignore empty” semantics).

So, memory_mb takes precedence over memory when both are set (assuming memory_mb is non-zero). [2]

Is this “officially supported”?

  • Official fly.toml reference: documents memory, not memory_mb. So “set both and rely on precedence” is not something the reference specifies/supports. [1]
  • Fly’s own docs/examples: some official guides use memory_mb in fly.toml examples (so memory_mb is clearly supported by tooling/docs in practice). [3]
  • Machines API field: the underlying Machine “guest” schema uses memory_mb as the canonical field. [4]

Practical takeaway: don’t set both; pick one. If you do set both, memory_mb wins in current flyctl. [2]

Sources:
[1] Fly.io config reference ([[vm]] / memory) (fly.io)
[2] flyctl source (computeToGuest: parses memory then applies memory_mb) (github.com)
[3] Fly.io “Use a MySQL Database” guide using memory_mb in fly.toml (fly.io)
[4] Fly Machines API schema (memory_mb) (fly.io)

Citations:


Remove memory_mb to conform to the official fly.toml specification.

The [[vm]] section officially documents only memory, not memory_mb. Having both fields present is unsupported: when set together, memory_mb silently takes precedence over memory, creating potential for unexpected configuration drift. Keep only memory (currently set to 1gb).

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@fly.toml` around lines 20 - 23, The fly.toml currently defines both memory
and memory_mb in the VM config, which is unsupported; remove the memory_mb =
1024 entry so only memory = '1gb' remains, leaving cpu_kind and cpus unchanged;
update any comments or related documentation referencing memory_mb and ensure no
other code or scripts rely on memory_mb instead of memory.

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