coder/examples/templates/fly-docker-image
Muhammad Atif Ali 63a9e34381
fix: correct free disk space reported by agent metadata in fly.io example (#7592)
2023-05-18 11:42:04 +03:00
..
README.md docs: add template to provision docker image based workspaces on fly.io (#6526) 2023-03-17 11:46:44 -05:00
main.tf fix: correct free disk space reported by agent metadata in fly.io example (#7592) 2023-05-18 11:42:04 +03:00

README.md

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.