Skip to content

marimo-team/marimo-flyio-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

marimo fly.io Template

This template provides a basic setup for deploying a marimo app to fly.io.

Requirements

  • Python 3.12 or higher
  • uv package manager
  • fly.io account

Setup

  1. Install uv

  2. Create a virtual environment and install dependencies:

uv sync
  1. Run locally:
uv run marimo edit

Deployment

  1. Install the fly.io CLI

  2. Login to fly.io:

fly auth login
  1. Create a new app (first time only):
fly launch
  1. Deploy:
fly deploy --remote-only
# REQUIRED! You must scale to 1 container
# because marimo is stateful.
fly scale count 1

GitHub Actions Deployment

To enable automatic deployments via GitHub Actions:

  1. Create a fly.io API token:
fly auth token
  1. Add the token as a GitHub secret named FLY_API_TOKEN

  2. Push to the main branch to trigger deployment

Development

  • Edit src/app.py to modify your marimo app
  • The app runs on port 2718 by default
  • fly.io will automatically assign a public URL

Local Development with uv

For development, you can use uv's pip commands:

# Install a new package
uv add package-name

# Update dependencies
uv sync