Skip to content

Commit ba678e9

Browse files
committed
docs: add new doc coder.md under Install
This adds a new doc explaining how to install code-server in a Coder workspace using Terraform.
1 parent e22cca3 commit ba678e9

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

docs/coder.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Coder
2+
3+
To install code-server in a Coder workspace, we suggest using the `install.sh`
4+
script in your template like so:
5+
6+
```terraform
7+
resource "coder_agent" "dev" {
8+
arch = "amd64"
9+
os = "linux"
10+
startup_script = <<EOF
11+
#!/bin/sh
12+
set -x
13+
# install and start code-server
14+
curl -fsSL https://code-server.dev/install.sh | sh -s -- --version 4.8.3
15+
code-server --auth none --port 13337 &
16+
EOF
17+
}
18+
19+
resource "coder_app" "code-server" {
20+
agent_id = coder_agent.dev.id
21+
slug = "code-server"
22+
display_name = "code-server"
23+
url = "http://localhost:13337/"
24+
icon = "/icon/code.svg"
25+
subdomain = false
26+
share = "owner"
27+
28+
healthcheck {
29+
url = "http://localhost:13337/healthz"
30+
interval = 3
31+
threshold = 10
32+
}
33+
}
34+
```
35+
36+
If you run into issues, ask for help on the `coder/coder` [Discussions
37+
here](https://github.com/coder/coder/discussions).

docs/manifest.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@
1919
"icon_path": "assets/images/icons/wrench.svg",
2020
"path": "./install.md",
2121
"children": [
22+
{
23+
"title": "Coder",
24+
"description": "How to install code-server in Coder",
25+
"path": "./coder.md"
26+
},
2227
{
2328
"title": "npm",
2429
"description": "How to install code-server using npm",

0 commit comments

Comments
 (0)