Fly.ioTutorial
Building an In-Browser IDE the Hard Way
Summary
This tutorial builds a personal remote development environment: an in-browser IDE for Elixir/Phoenix work, deployed as a Fly Machine from a Dockerfile and managed with command-line tools. The image uses an official Elixir base, adds code-server, flyctl, build dependencies, and the Elixir Language Server extension, while a multi-stage build copies in Tired Proxy. A persistent volume holds working files, and the startup configuration can clone a repository, launch code-server behind HTTPS, and arrange for the machine to sleep after an hour without HTTP requests. From the IDE terminal, the walkthrough then creates and deploys a separate Phoenix hello-world application backed by SQLite, setting its secret and provisioning storage. The resulting setup can wake on browser access, but random HTTP traffic or an active code-server terminal may keep it running, and stopping or destroying the apps limits costs.
Context
The project demonstrates a personal, individually used remote development environment that does not need load balancing, many instances, or continuous operation. Running the environment only when needed reduces costs, while persistent storage preserves working files.
Approach / What changed
The setup uses a Dockerfile based on Elixir, installs code-server, flyctl, build tools, and the Elixir Language Server extension, and adds Tired Proxy to stop the Fly Machine after inactivity. A persistent volume stores project files. The code-server terminal is then used to configure and deploy a separate Phoenix application with SQLite storage.
Takeaways
The development image combines an official Elixir base with code-server, flyctl, and the Elixir Language Server extension, using a multi-stage build to copy in Tired Proxy.
Tired Proxy can shut down the machine after an hour without HTTP requests, while Fly’s proxy can wake it for browser traffic; random bots and an active terminal may prevent it from sleeping.
The walkthrough deploys a separate Phoenix hello-world app from the remote IDE, generating SECRET_KEY_BASE, creating an encrypted 1GB volume, and using SQLite for storage.
Source and freshness
- Source
- fly.io
- Published
- Added to Yomu
- Last updated
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.