Files
coder/examples/templates/fly-docker-image/README.md
T
Muhammad Atif AliandBen e6d52b07b7 docs: add template to provision docker image based workspaces on fly.io (#6526)
* add fly.io example

* fix: `fly_volume` does not allow using - in name.

fix: `fly_volume` does not allow using - in the name.

* fix: provider versions  and settings

* fix: valid `fly_app` name

* chore: ipv6 is not used

* fix: names

strangely `fly_volume` does not allow `-` and `fly_app` does not allow `_`.

* chore: update max RAM

* add fly-auth-api managed variables

* Update README.md

* improve setup flow

- user is not prompted in UI for default values
- org slug is best fetched via CLI

* add metadata

* add to starter templates

---------

Co-authored-by: Ben <me@bpmct.net>
2023-03-17 11:46:44 -05:00

1.5 KiB

name, description, tags, icon
name description tags icon
Develop on a Fly.io container Run workspaces as Firecracker VMs on Fly.io
docker
fly.io
/icon/fly.io.svg

Coder Fly.io Template

This template provisions a code-server instance on fly.io using the codercom/code-server image.

Prerequisites

  • flyctl installed.
  • Coder already setup and running with coder-cli installed locally.

Getting started

  1. Run coder templates init and select this template. Follow the instructions that appear.
  2. cd into the directory that was created. (e.g. cd fly-docker-image)
  3. Create the new template by running the following command from the fly-docker-image directory:
coder templates create fly-docker-image \
  --variable fly_api_token=$(flyctl auth token) \
  --variable fly_org=personal

If the Coder server is also running as a fly.io app, then instead of setting variable fly_api_token you can also set a fly.io secret with the name FLY_API_TOKEN

flyctl secrets set FLY_API_TOKEN=$(flyctl auth token) --app <your-coder-app-name>

Read our blog post to learn more about how to deploy Coder on fly.io.

  1. Navigate to the Coder dashboard and create a new workspace using the template.

This is all. You should now have a code-server instance running on fly.io.