You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/tutorials/template-from-scratch.md
+28-55
Original file line number
Diff line number
Diff line change
@@ -1,27 +1,12 @@
1
-
# A guided tour of a template
1
+
# Write a template from scratch
2
2
3
-
This guided tour introduces you to the different parts of a Coder template by
4
-
showing you how to create a template from scratch.
3
+
A template is a common configuration that you use to deploy workspaces.
5
4
6
-
You'll write a simple template that provisions a workspace as a Docker container
7
-
with Ubuntu.
5
+
This tutorial teaches you how to create a template that provisions a workspace as a Docker container with Ubuntu.
8
6
9
7
## Before you start
10
8
11
-
To follow this guide, you'll need:
12
-
13
-
- A computer or cloud computing instance with both
14
-
[Docker](https://docs.docker.com/get-docker/) and [Coder](../install/index.md)
15
-
installed on it.
16
-
17
-
- When setting up your computer or computing instance, make sure to install
18
-
Docker first, then Coder. Otherwise, you'll need to add the `coder` user to
19
-
the `docker` group.
20
-
21
-
- The URL for your Coder instance. If you're running Coder locally, the default
22
-
URL is [http://127.0.0.1:3000](http://127.0.0.1:3000).
23
-
24
-
- A text editor. For this tour, we use [GNU nano](https://nano-editor.org/).
9
+
You'll need a computer or cloud computing instance with both [Docker](https://docs.docker.com/get-docker/) and [Coder](../install/index.md) installed on it.
25
10
26
11
## What's in a template
27
12
@@ -37,22 +22,21 @@ started, or stopped.
37
22
> [Getting Started Guides](https://developer.hashicorp.com/terraform/tutorials).
38
23
39
24
Here's a simplified diagram that shows the main parts of the template we'll
- Installs [code-server](https://coder.com/docs/code-server), a browser-based [VS Code](https://code.visualstudio.com/) app that runs in the workspace.
We use the data source from `coder_workspace` to set the environment variables based on the workspace's owner. This way, the owner can make git commits immediately without any manual configuration.
Our template has `metadata` blocks for CPU and RAM usage.
210
186
211
187
## 4. coder_app
212
188
@@ -220,10 +196,7 @@ This is commonly used for
220
196
[web IDEs](../user-guides/workspace-access/web-ides.md) such as
221
197
[code-server](https://coder.com/docs/code-server), RStudio, and JupyterLab.
222
198
223
-
To install code-server in the workspace, remember that we installed it in the
224
-
`startup_script` argument in `coder_agent`. We make it available from a
225
-
workspace with a `coder_app` resource. See
226
-
[web IDEs](../user-guides/workspace-access/web-ides.md) for more examples.
199
+
We installed code-server in the `startup_script` argument. To add code-server to the workspace, make it available from a workspace with a `coder_app` resource. See [web IDEs](../user-guides/workspace-access/web-ides.md) for more examples.
0 commit comments