Skip to content

A typescript client for managing Fly.io Machines

License

Notifications You must be signed in to change notification settings

supabase/fly-admin

This branch is 35 commits ahead of, 14 commits behind supabase/fly-preview:main.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

7beeaec · Mar 12, 2024

History

49 Commits
May 29, 2023
Jan 18, 2024
Mar 12, 2024
Apr 20, 2023
Apr 20, 2023
Apr 20, 2023
May 13, 2023
May 13, 2023
May 13, 2023
May 13, 2023
Sep 8, 2023
Sep 7, 2023
Sep 7, 2023
Sep 7, 2023
May 29, 2023

Repository files navigation

fly-admin

A Typescript client for managing Fly infrastructure.

Install

npm i --save fly-admin

Usage

import { createClient } from 'fly-admin'

const fly = createClient('FLY_API_TOKEN')

async function deployApp() {
  const machine = await fly.Machine.createMachine({
    app_name: 'myAppId',
    image: 'supabase/postgres',
  })
}

API

Apps

  • fly.App.listApps()
  • fly.App.getApp()
  • fly.App.createApp()
  • fly.App.deleteApp()

Machines

  • fly.Machine.listMachines()
  • fly.Machine.getMachine()
  • fly.Machine.createMachine()
  • fly.Machine.updateMachine()
  • fly.Machine.startMachine()
  • fly.Machine.stopMachine()
  • fly.Machine.deleteMachine()
  • fly.Machine.restartMachine()
  • fly.Machine.signalMachine()
  • fly.Machine.waitMachine()
  • fly.Machine.cordonMachine()
  • fly.Machine.uncordonMachine()
  • fly.Machine.listEvents()
  • fly.Machine.listVersions()
  • fly.Machine.listProcesses()
  • fly.Machine.getLease()
  • fly.Machine.acquireLease()

Networks

  • fly.Network.allocateIpAddress()
  • fly.Network.releaseIpAddress()

Organizations

  • fly.Organization.getOrganization()

Secrets

  • fly.Secret.setSecrets()
  • fly.Secret.unsetSecrets()

Volumes

  • fly.Volume.listVolumes()
  • fly.Volume.getVolume()
  • fly.Volume.createVolume()
  • fly.Volume.deleteVolume()
  • fly.Volume.extendVolume()
  • fly.Volume.listSnapshots()

TODO

  • fly.Machine.execMachine()
  • fly.Machine.releaseLease()
  • fly.Machine.getMetadata()
  • fly.Machine.updateMetadata()
  • fly.Machine.deleteMetadata()

License

MIT

About

A typescript client for managing Fly.io Machines

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 99.7%
  • JavaScript 0.3%