@@ -5,7 +5,9 @@ By default, Coder workspaces allow connections via:
5
5
- Web terminal
6
6
- SSH (plus any [ SSH-compatible IDE] ( ../ides.md ) )
7
7
8
- It's common to also let developers to connect via web IDEs.
8
+ It's common to also let developers to connect via web IDEs for uses cases like
9
+ zero trust networks, data science, contractors, and infrequent code
10
+ contributors.
9
11
10
12
![ Row of IDEs] ( ../images/ide-row.png )
11
13
@@ -32,9 +34,34 @@ resource "coder_app" "portainer" {
32
34
}
33
35
```
34
36
35
- ## code-server
37
+ ## External URLs
36
38
37
- ![ code-server in a workspace] ( ../images/code-server-ide.png )
39
+ Any URL external to the Coder deployment is accessible as a ` coder_app ` . e.g.,
40
+ Dropbox, Slack, Discord, GitHub
41
+
42
+ ``` hcl
43
+ resource "coder_app" "pubslack" {
44
+ agent_id = coder_agent.coder.id
45
+ display_name = "Coder Public Slack"
46
+ slug = "pubslack"
47
+ url = "https://coder-com.slack.com/"
48
+ icon = "https://cdn2.hubspot.net/hubfs/521324/slack-logo.png"
49
+ external = true
50
+ }
51
+
52
+ resource "coder_app" "discord" {
53
+ agent_id = coder_agent.coder.id
54
+ display_name = "Coder Discord"
55
+ slug = "discord"
56
+ url = "https://discord.com/invite/coder"
57
+ icon = "https://logodix.com/logo/573024.png"
58
+ external = true
59
+ }
60
+ ```
61
+
62
+ ![ External URLs] ( ../images/external-apps.png )
63
+
64
+ ## code-server
38
65
39
66
[ code-server] ( https://github.com/coder/coder ) is our supported method of running
40
67
VS Code in the web browser. A simple way to install code-server in Linux/macOS
@@ -104,10 +131,12 @@ resource "coder_app" "code-server" {
104
131
}
105
132
```
106
133
107
- ## VS Code Web
134
+ ![ code-server in a workspace] ( ../images/code-server-ide.png )
135
+
136
+ ## VS Code Server
108
137
109
138
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
139
+ command. To add VS Code web as a web IDE, Install and start this in your
111
140
` startup_script ` and create a corresponding ` coder_app `
112
141
113
142
``` hcl
@@ -125,13 +154,28 @@ resource "coder_agent" "main" {
125
154
}
126
155
```
127
156
128
- > [ !NOTE] > ` code serve-web ` was introduced in version 1.82.0 (August 2023).
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.
129
160
130
- You also need to add a ` coder_app ` resource for this,
161
+ ``` hcl
162
+ # VS Code Server
163
+ resource "coder_app" "vscode-server" {
164
+ agent_id = coder_agent.coder.id
165
+ slug = "vscode-server"
166
+ display_name = "VS Code Server"
167
+ icon = "/icon/code.svg"
168
+ url = "http://localhost:13338?folder=/home/coder"
169
+ subdomain = false
170
+ share = "owner"
131
171
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 }
172
+ healthcheck {
173
+ url = "http://localhost:13338/healthz"
174
+ interval = 3
175
+ threshold = 10
176
+ }
177
+ }
178
+ ```
135
179
136
180
## JupyterLab
137
181
@@ -168,7 +212,7 @@ resource "coder_app" "jupyter" {
168
212
}
169
213
```
170
214
171
- ![ JupyterLab in Coder] ( ../images/jupyter-on-docker .png )
215
+ ![ JupyterLab in Coder] ( ../images/jupyter.png )
172
216
173
217
## RStudio
174
218
@@ -244,6 +288,43 @@ resource "coder_app" "airflow" {
244
288
245
289
![ Airflow in Coder] ( ../images/airflow-port-forward.png )
246
290
291
+ ## File Browser
292
+
293
+ Show and manipulate the contents of the ` /home/coder ` directory in a browser.
294
+
295
+ ``` hcl
296
+ resource "coder_agent" "coder" {
297
+ os = "linux"
298
+ arch = "amd64"
299
+ dir = "/home/coder"
300
+ startup_script = <<EOT
301
+ #!/bin/bash
302
+
303
+ curl -fsSL https://raw.githubusercontent.com/filebrowser/get/master/get.sh | bash
304
+ filebrowser --noauth --root /home/coder --port 13339 >/tmp/filebrowser.log 2>&1 &
305
+
306
+ EOT
307
+ }
308
+
309
+ resource "coder_app" "filebrowser" {
310
+ agent_id = coder_agent.coder.id
311
+ display_name = "file browser"
312
+ slug = "filebrowser"
313
+ url = "http://localhost:13339"
314
+ icon = "https://raw.githubusercontent.com/matifali/logos/main/database.svg"
315
+ subdomain = true
316
+ share = "owner"
317
+
318
+ healthcheck {
319
+ url = "http://localhost:13339/healthz"
320
+ interval = 3
321
+ threshold = 10
322
+ }
323
+ }
324
+ ```
325
+
326
+ ![ File Browser] ( ../images/file-browser.png )
327
+
247
328
## SSH Fallback
248
329
249
330
If you prefer to run web IDEs in localhost, you can port forward using
0 commit comments