mirror of
https://github.com/coder/code-server.git
synced 2025-09-18 10:32:05 +08:00
docs: add usage in Coder (#5975)
* docs: add difference between Coder Add a short block explaining the difference between code-server and Coder. * 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.
This commit is contained in:
37
docs/coder.md
Normal file
37
docs/coder.md
Normal file
@ -0,0 +1,37 @@
|
||||
# Coder
|
||||
|
||||
To install and run code-server in a Coder workspace, we suggest using the `install.sh`
|
||||
script in your template like so:
|
||||
|
||||
```terraform
|
||||
resource "coder_agent" "dev" {
|
||||
arch = "amd64"
|
||||
os = "linux"
|
||||
startup_script = <<EOF
|
||||
#!/bin/sh
|
||||
set -x
|
||||
# install and start code-server
|
||||
curl -fsSL https://code-server.dev/install.sh | sh -s -- --version 4.8.3
|
||||
code-server --auth none --port 13337 &
|
||||
EOF
|
||||
}
|
||||
|
||||
resource "coder_app" "code-server" {
|
||||
agent_id = coder_agent.dev.id
|
||||
slug = "code-server"
|
||||
display_name = "code-server"
|
||||
url = "http://localhost:13337/"
|
||||
icon = "/icon/code.svg"
|
||||
subdomain = false
|
||||
share = "owner"
|
||||
|
||||
healthcheck {
|
||||
url = "http://localhost:13337/healthz"
|
||||
interval = 3
|
||||
threshold = 10
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
If you run into issues, ask for help on the `coder/coder` [Discussions
|
||||
here](https://github.com/coder/coder/discussions).
|
Reference in New Issue
Block a user