@@ -45,7 +45,7 @@ resource "coder_app" "pubslack" {
4545 display_name = "Coder Public Slack"
4646 slug = "pubslack"
4747 url = "https://coder-com.slack.com/"
48- icon = "https://cdn2.hubspot.net/hubfs/521324/ slack-logo.png "
48+ icon = "/icon/ slack.svg "
4949 external = true
5050}
5151
@@ -54,7 +54,7 @@ resource "coder_app" "discord" {
5454 display_name = "Coder Discord"
5555 slug = "discord"
5656 url = "https://discord.com/invite/coder"
57- icon = "https://logodix.com/logo/573024.png "
57+ icon = "/icon/discord.svg "
5858 external = true
5959}
6060```
@@ -133,43 +133,59 @@ resource "coder_app" "code-server" {
133133
134134![ code-server in a workspace] ( ../images/code-server-ide.png )
135135
136- ## VS Code Server
136+ ## VS Code Web
137137
138138VS Code supports launching a local web client using the ` code serve-web `
139- command. To add VS Code web as a web IDE, Install and start this in your
140- ` startup_script ` and create a corresponding ` coder_app `
141-
142- ``` hcl
143- resource "coder_agent" "main" {
144- arch = "amd64"
145- os = "linux"
146- startup_script = <<EOF
147- #!/bin/sh
148- # install VS Code
149- curl -L "https://update.code.visualstudio.com/1.82.0/linux-deb-x64/stable" -o /tmp/code.deb
150- sudo dpkg -i /tmp/code.deb && sudo apt-get install -f -y
151- # start the web server on a specific port
152- code serve-web --port 13338 --without-connection-token --accept-server-license-terms >/tmp/vscode-web.log 2>&1 &
153- EOF
154- }
155- ```
156-
157- > ` code serve-web ` was introduced in version 1.82.0 (August 2023).
158-
159- You also need to add a ` coder_app ` resource for this.
160-
161- ``` hcl
162- # VS Code Web
163- resource "coder_app" "vscode-web" {
164- agent_id = coder_agent.coder.id
165- slug = "vscode-web"
166- display_name = "VS Code Web"
167- icon = "/icon/code.svg"
168- url = "http://localhost:13338?folder=/home/coder"
169- subdomain = true # VS Code Web does currently does not work with a subpath https://github.com/microsoft/vscode/issues/192947
170- share = "owner"
171- }
172- ```
139+ command. To add VS Code web as a web IDE, you have two options.
140+
141+ 1 . Install using the
142+ [ vscode-web module] ( https://registry.coder.com/modules/vscode-web ) from the
143+ coder registry.
144+
145+ ``` hcl
146+ module "vscode-web" {
147+ source = "https://registry.coder.com/modules/vscode-web"
148+ agent_id = coder_agent.main.id
149+ accept_license = true
150+ }
151+ ```
152+
153+ 2 . Install and start in your ` startup_script ` and create a corresponding
154+ ` coder_app `
155+
156+ ``` hcl
157+ resource "coder_agent" "main" {
158+ arch = "amd64"
159+ os = "linux"
160+ startup_script = <<EOF
161+ #!/bin/sh
162+ # install VS Code
163+ curl -Lk 'https://code.visualstudio.com/sha/download?build=stable&os=cli-alpine-x64' --output vscode_cli.tar.gz
164+ mkdir -p /tmp/vscode-cli
165+ tar -xf vscode_cli.tar.gz -C /tmp/vscode-cli
166+ rm vscode_cli.tar.gz
167+ # start the web server on a specific port
168+ /tmp/vscode-cli/code serve-web --port 13338 --without-connection-token --accept-server-license-terms >/tmp/vscode-web.log 2>&1 &
169+ EOF
170+ }
171+ ```
172+
173+ > ` code serve-web ` was introduced in version 1.82.0 (August 2023).
174+
175+ You also need to add a ` coder_app ` resource for this.
176+
177+ ``` hcl
178+ # VS Code Web
179+ resource "coder_app" "vscode-web" {
180+ agent_id = coder_agent.coder.id
181+ slug = "vscode-web"
182+ display_name = "VS Code Web"
183+ icon = "/icon/code.svg"
184+ url = "http://localhost:13338?folder=/home/coder"
185+ subdomain = true # VS Code Web does currently does not work with a subpath https://github.com/microsoft/vscode/issues/192947
186+ share = "owner"
187+ }
188+ ```
173189
174190## JupyterLab
175191
0 commit comments