• Stars
    star
    1,298
  • Rank 34,769 (Top 0.8 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created almost 5 years ago
  • Updated 21 days ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Command line tools for fly.io services

flyctl

flyctl is a command-line interface for fly.io

Note: Most installations of flyctl also alias flyctl to fly as a command name and this will become the default name in the future. During the transition, note that where you see flyctl as a command it can be replaced with fly.

Installation

Using a Package Manager

Homebrew (macOS, Linux, WSL)

brew install flyctl

To upgrade to the latest version:

brew upgrade flyctl

Install Script

Download flyctl and install into a local bin directory.

MacOS, Linux, WSL

Installing the latest version:

curl -L https://fly.io/install.sh | sh

Installing the latest pre-release version:

curl -L https://fly.io/install.sh | sh -s pre

Installing a specific version:

curl -L https://fly.io/install.sh | sh -s 0.0.200

Windows

Run the Powershell install script:

iwr https://fly.io/install.ps1 -useb | iex

Downloading from GitHub

Download the appropriate version from the Releases page of the flyctl GitHub repository.

Getting Started

  1. Sign into your fly account
fly auth login
  1. List your apps
fly apps list
  1. View app status
fly status -a {app-name}

App Settings

flyctl will attempt to use the app name from a fly.toml file in the current directory. For example, if the current directory contains this file:

$ cat fly.toml
app: banana

flyctl will operate against the banana app unless overridden by the -a flag or other app name setting in the command line.

Building on Windows

There is a simple Powershell script, winbuild.ps1, which will run the code generation for the help files, format them, and run a full build, leaving a new binary in the bin directory.

Running from branches on your local machine

Run scripts/build-dfly to build a Docker image from the current branch. Then, use scripts/dfly to run it. This assumes you are already authenticated to Fly in your local environment.

Cutting a release

If you have write access to this repo, you can ship a prerelease or full release with:

scripts/bump_version.sh prerel

or

scripts/bump_version.sh

Running preflight tests

A preflight suite of integration tests is located under the test/preflight/ directory. It uses a flyctl binary and runs real user scenarios, including deploying apps and dbs, and validates expected behavior.

Warning: Real apps will be deployed that cost real money. The test fixture does its best to destroy resources it creates, but sometimes it may fail to delete a resource.

The easiest way to run the preflight tests is:

Copy .direnv/preflight-example to .direnv/preflight and edit following these guidelines:

  • Grab your auth token from ~/.fly/config.yml
  • Do not use your "personal" org, create an new org (i.e. flyctl-tests-YOURNAME)
  • Set 2 regions, ideally not your closest region because it leads to false positives when --region or primary region handling is buggy. Run fly platform regions for valid ids.

Finally run the tests:

make preflight-test

That builds a flyctl binary (just like running make), then runs the preflight tests against that binary.

To run a single test:

make preflight-test T=TestAppsV2Example

Oh, add more preflight tests at tests/preflight/*

More Repositories

1

litefs

FUSE-based file system for replicating SQLite databases across a cluster of machines
Go
3,624
star
2

fly

Deploy app servers close to your users. Package your app as a Docker image, and launch it in 17 cities with one simple CLI.
981
star
3

corrosion

Gossip-based service discovery (and more) for large distributed systems.
Rust
577
star
4

fly-log-shipper

Ship logs from fly to other providers
Shell
257
star
5

init-snapshot

Fly
Rust
246
star
6

flyctl-actions

:octocat: GitHub Action that wraps the flyctl
TypeScript
238
star
7

wormhole

Fly.io secure tunnel
Go
181
star
8

ltx

Go library for the LTX file format
Go
180
star
9

tokenizer

HTTP proxy that injects 3rd party credentials into requests
Go
175
star
10

fly-pr-review-apps

Github Action for PR Review Apps on Fly.io
Shell
164
star
11

edge

A set of useful libraries for Edge Apps. Run locally, write tests, and integrate it into your deployment process. Move fast and maybe don't break things? Because, gosh darnit, you're an adult.
TypeScript
144
star
12

fly_postgres_elixir

Library for working with local read-replica postgres databases and performing writes through RPC calls to other nodes in the primary Fly.io region.
Elixir
91
star
13

docs

HTML
89
star
14

fly-ruby

Ruby gem for handling requests within a Fly.io multiregion database setup
Ruby
85
star
15

ssokenizer

Go
81
star
16

litefs-example

An example of deploying LiteFS on Fly.io.
Go
63
star
17

macaroon

Fly.io macaroon implementation
Go
58
star
18

fly_rpc_elixir

Makes it easier to build distributed Elixir applications on the Fly.io platform. Adds region awareness to an app and makes it easy to perform RPC calls in other Fly.io regions.
Elixir
51
star
19

fly.rs

Fly Edge Application runtime.
Rust
40
star
20

rchab

Fly.io Remote Builder (Remote Controlled Hot Air Balloon)
Go
38
star
21

elixir-hiring-project

This is a sample project we use to assess Elixir/Phoenix/LiveView skills, and also simulate an idea of the type of work a dev advocate could end up doing at Fly.io.
Elixir
35
star
22

litevfs

LiteFS VFS SQLite extension for serverless environments
Rust
35
star
23

dropspy

Go implementation of the venerable dropwatch utility
Go
34
star
24

fly-node

Node.js Express-compatible middleware for enhancing apps deployed on Fly.io
TypeScript
34
star
25

tired-proxy

An http proxy that's just too tired and eventually shuts down
Go
33
star
26

bfaas

Bash functions-as-a-service
TypeScript
21
star
27

onehostname

A Fly Edge Application for combining a bunch of different backends under one hostname
TypeScript
17
star
28

gravitas

Ruby
17
star
29

stimulus-live-elements

Live Element support for Rails via Stimulus
JavaScript
16
star
30

fly-checks

Basic health-check framework
Go
15
star
31

machine-proxy

PoC HTTP proxy for scale-to-zero apps via the Fly machines API
Go
14
star
32

burn

HTTP load testing tool
Go
13
star
33

fly-rails

Rails support for Fly-io
Ruby
13
star
34

image-processing

TypeScript
13
star
35

fly-autoscaler

A metrics-based autoscaler for Fly.io
Go
12
star
36

recco

Gain information about applications to inform deployments
Go
12
star
37

doh-proxy

Docker image: DNS over HTTPS proxy
Dockerfile
11
star
38

multi-cloud-haproxy

Awk
11
star
39

fly-go

Go client for the Fly.io API
Go
10
star
40

flyjs

The Fly JavaScript runtime (archived)
TypeScript
10
star
41

litefs-go

Go library for interacting with LiteFS.
Go
9
star
42

dns-help

Instructions for pointing a domain at your Fly edge application
JavaScript
8
star
43

glitch-domains

JavaScript
8
star
44

sqlite3-restore

Utility for performing an online restore of a SQLite database.
Go
8
star
45

anti-roadmap

This is the opposite of a roadmap. A place where we track things we're probably not going to do.
8
star
46

dashboards

Collection of dashboards for visualizing Fly.io app data
8
star
47

fly-builders

CNB Buildpacks for Fly - supporting (so far) Deno
Shell
7
star
48

fly.cr

Crystal HTTP middleware to handle fly.io multi-region postgres replays.
Crystal
7
star
49

wordpress-image-optimizer

JavaScript
7
star
50

pixelfly

An HTTP image service
TypeScript
6
star
51

ghost-accelerator

JavaScript
6
star
52

ltx-rs

Rust library for the LTX file format
Rust
6
star
53

load-balancer

Fly application load balancer.
TypeScript
5
star
54

shout

Shouting is an effective way of communicating between hot air balloons
Go
4
star
55

embedding-v8-talk

A talk about embedding v8
TypeScript
4
star
56

fly-heroku-buildpack

Heroku buildpack that automatically connects apps to Fly.io
Shell
4
star
57

flygit

https://rawgit.com on Fly
JavaScript
4
star
58

litefs-node

A Node.js library for interacting with LiteFS.
C++
4
star
59

homebrew-tap

Ruby
4
star
60

anycable-rails

Run Anycable with Rails on Fly
Ruby
4
star
61

cee-dee-en

A basic CDN example using a Fly Edge App
JavaScript
3
star
62

glitch-custom-hostnames

Run any glitch app with a custom hostname
JavaScript
3
star
63

fly-openapi-sdk

Generated API clients for the Fly machines API
Python
3
star
64

litefs-ruby

Ruby library for interacting with LiteFS.
Makefile
3
star
65

talks

Various talks we've given
TypeScript
3
star
66

tokenizer-elixir

Elixir
3
star
67

macaroon-elixir

Elixir library for attenuating Fly.io macaroons
Elixir
3
star
68

aws-lambda-express-example

A light-weight example of AWS Lambda, using Express.js and Claudia.js.
JavaScript
2
star
69

fileserver

Simple and dockerized fasthttp-based fileserver
Go
2
star
70

flu

Start of a utility command line tool
Go
2
star
71

lfsc-go

Go client for LiteFS Cloud
Go
2
star
72

csharp-example

Deploy an example c# app to Fly
C#
2
star
73

fly-docker-example

Demonstrates horizontal scaling with Docker/Nginx and Docker/Fly.
JavaScript
2
star
74

cookiebot

Example macaroon discharge service
Go
2
star
75

redis-cache-example

Go
1
star
76

api-versioning

JavaScript
1
star
77

actioncable_redis-reconnect

A patch for ActionCable Redis that reconnects after it disconnects
Ruby
1
star
78

domain-reseller-guide

1
star
79

ruby-example

Deploy an example Ruby app to Fly
Ruby
1
star
80

fly-on-deno

TypeScript
1
star
81

pushpin-example

Pushpin on Fly
Dockerfile
1
star
82

ab-test-example-app

JavaScript
1
star
83

tipe-react-edge

Rendering Tipe API responses with React on the edge
JavaScript
1
star
84

responsive-images

Make images on any app responsive
JavaScript
1
star
85

go-example

Deploy an example Go app to Fly
Dockerfile
1
star
86

gpu-burn-app

A Fly app to stress GPU cards
Dockerfile
1
star