File tree 1 file changed +29
-0
lines changed
1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -104,6 +104,35 @@ resource "coder_app" "code-server" {
104
104
}
105
105
```
106
106
107
+ ## VS Code Web
108
+
109
+ VS Code supports launching a local web client using the ` code serve-web `
110
+ command. To add VS COde web as a web IDE, Install and start this in your
111
+ ` startup_script ` and create a corresponding ` coder_app `
112
+
113
+ ``` hcl
114
+ resource "coder_agent" "main" {
115
+ arch = "amd64"
116
+ os = "linux"
117
+ startup_script = <<EOF
118
+ #!/bin/sh
119
+ # install VS Code
120
+ curl -L "https://update.code.visualstudio.com/1.82.0/linux-deb-x64/stable" -o /tmp/code.deb
121
+ sudo dpkg -i /tmp/code.deb && sudo apt-get install -f -y
122
+ # start the web server on a specific port
123
+ code serve-web --port 13338 --without-connection-token --accept-server-license-terms >/tmp/vscode-web.log 2>&1 &
124
+ EOF
125
+ }
126
+ ```
127
+
128
+ > [ !NOTE] > ` code serve-web ` was introduced in version 1.82.0 (August 2023).
129
+
130
+ You also need to add a ` coder_app ` resource for this,
131
+
132
+ resource "coder_app" "vscode-web" { agent_id = coder_agent.coder.id slug =
133
+ "vscode-web" display_name = "VS Code Web" url = "http://localhost:13338 " icon =
134
+ "/icon/code.svg" share = "owner" subdomain = true }
135
+
107
136
## JupyterLab
108
137
109
138
Configure your agent and ` coder_app ` like so to use Jupyter. Notice the
You can’t perform that action at this time.
0 commit comments