Skip to content

Commit 68b1b2b

Browse files
committed
add fly.io
1 parent a7cfec9 commit 68b1b2b

File tree

1 file changed

+20
-6
lines changed

1 file changed

+20
-6
lines changed

examples/templates/fly-docker-image/README.md

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,18 @@ verified: true
77
tags: [fly, container]
88
---
99

10-
# Coder Fly.io Template
10+
# Remote Development on Fly.io Machines
1111

12-
This template provisions a [code-server](https://github.com/coder/code-server) instance on [fly.io](https://fly.io) using the [codercom/code-server](https://hub.docker.com/r/codercom/code-server) image.
12+
Provision Fly.io Machines as [Coder workspaces](https://coder.com/docs/coder-v2/latest) with this example template.
13+
14+
<!-- TODO: Add screenshot -->
1315

1416
## Prerequisites
1517

1618
- [flyctl](https://fly.io/docs/getting-started/installing-flyctl/) installed.
1719
- [Coder](https://coder.com/) already setup and running with coder-cli installed locally.
1820

19-
## Getting started
21+
### Authentication
2022

2123
1. Run `coder templates init` and select this template. Follow the instructions that appear.
2224
2. cd into the directory that was created. (e.g. `cd fly-docker-image`)
@@ -34,8 +36,20 @@ coder templates create fly-docker-image \
3436
> flyctl secrets set FLY_API_TOKEN=$(flyctl auth token) --app <your-coder-app-name>
3537
> ```
3638
37-
> Read our blog [post](coder.com/blog/deploying-coder-on-fly-io) to learn more about how to deploy Coder on fly.io.
38-
3939
4. Navigate to the Coder dashboard and create a new workspace using the template.
4040
41-
This is all. You should now have a code-server instance running on fly.io.
41+
## Architecture
42+
43+
This template provisions the following resources:
44+
45+
- Fly.io Machine (ephemeral, deleted on stop)
46+
- Fly.io Volume (persistent, mounted to `/home/coder`)
47+
48+
This means, when the workspace restarts, any tools or files outside of the home directory are not persisted. To pre-bake tools into the workspace (e.g. `python3`), modify the VM image, or use a [startup script](https://registry.terraform.io/providers/coder/coder/latest/docs/resources/script).
49+
50+
> **Note**
51+
> This template is designed to be a starting point! Edit the Terraform to extend the template to support your use case.
52+
53+
---
54+
55+
Read our blog [post](coder.com/blog/deploying-coder-on-fly-io) to learn more about how to deploy Coder on fly.io.

0 commit comments

Comments
 (0)