@@ -45,7 +45,7 @@ resource "coder_app" "pubslack" {
45
45
display_name = "Coder Public Slack"
46
46
slug = "pubslack"
47
47
url = "https://coder-com.slack.com/"
48
- icon = "https://cdn2.hubspot.net/hubfs/521324/ slack-logo.png "
48
+ icon = "/icon/ slack.svg "
49
49
external = true
50
50
}
51
51
@@ -54,7 +54,7 @@ resource "coder_app" "discord" {
54
54
display_name = "Coder Discord"
55
55
slug = "discord"
56
56
url = "https://discord.com/invite/coder"
57
- icon = "https://logodix.com/logo/573024.png "
57
+ icon = "/icon/discord.svg "
58
58
external = true
59
59
}
60
60
```
@@ -133,43 +133,56 @@ resource "coder_app" "code-server" {
133
133
134
134
![ code-server in a workspace] ( ../images/code-server-ide.png )
135
135
136
- ## VS Code Server
136
+ ## VS Code Web
137
137
138
138
VS 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 [ vscode-web module] ( https://registry.coder.com/modules/vscode-web ) from the coder registry.
142
+
143
+ ``` hcl
144
+ module "vscode-web" {
145
+ source = "https://registry.coder.com/modules/vscode-web"
146
+ agent_id = coder_agent.main.id
147
+ accept_license = true
148
+ }
149
+ ```
150
+
151
+ 2. Install and start in your `startup_script` and create a corresponding `coder_app`
152
+
153
+ ```hcl
154
+ resource "coder_agent" "main" {
155
+ arch = "amd64"
156
+ os = "linux"
157
+ startup_script = <<EOF
158
+ #!/bin/sh
159
+ # install VS Code
160
+ curl -Lk 'https://code.visualstudio.com/sha/download?build=stable&os=cli-alpine-x64' --output vscode_cli.tar.gz
161
+ mkdir -p /tmp/vscode-cli
162
+ tar -xf vscode_cli.tar.gz -C /tmp/vscode-cli
163
+ rm vscode_cli.tar.gz
164
+ # start the web server on a specific port
165
+ /tmp/vscode-cli/code serve-web --port 13338 --without-connection-token --accept-server-license-terms >/tmp/vscode-web.log 2>&1 &
166
+ EOF
167
+ }
168
+ ```
169
+
170
+ > `code serve-web` was introduced in version 1.82.0 (August 2023).
171
+
172
+ You also need to add a `coder_app` resource for this.
173
+
174
+ ```hcl
175
+ # VS Code Web
176
+ resource "coder_app" "vscode-web" {
177
+ agent_id = coder_agent.coder.id
178
+ slug = "vscode-web"
179
+ display_name = "VS Code Web"
180
+ icon = "/icon/code.svg"
181
+ url = "http://localhost:13338?folder=/home/coder"
182
+ subdomain = true # VS Code Web does currently does not work with a subpath https://github.com/microsoft/vscode/issues/192947
183
+ share = "owner"
184
+ }
185
+ ```
173
186
174
187
## JupyterLab
175
188
0 commit comments