@@ -139,7 +139,7 @@ projector:
139
139
140
140
- PyCharm
141
141
([ Docker] ( https://github.com/sharkymark/v2-templates/tree/main/docker-with-pycharm ) ,
142
- [ Kubernetes] ( https://github.com/sharkymark/v2-templates/tree/main/multi-projector-pycharm )
142
+ [ Kubernetes] ( https://github.com/sharkymark/v2-templates/tree/main/multi-projector-pycharm ) )
143
143
144
144
> You need to have a valid ` ~/.kube/config ` on your Coder host and a namespace
145
145
> on a Kubernetes cluster to use the Kubernetes pod template examples.
@@ -153,39 +153,34 @@ Configure your agent and `coder_app` like so to use Jupyter:
153
153
``` hcl
154
154
data "coder_workspace" "me" {}
155
155
156
- ## The name of the app must always be equal to the "/apps/<name>"
157
- ## string in the base_url. This caveat is unique to Jupyter.
158
-
159
- locals {
160
- jupyter_base_path = "/@${data.coder_workspace.me.owner}/${data.coder_workspace.me.name}/apps/JupyterLab/"
161
- }
162
-
163
156
resource "coder_agent" "coder" {
164
157
os = "linux"
165
158
arch = "amd64"
166
159
dir = "/home/coder"
167
160
startup_script = <<-EOF
168
161
pip3 install jupyterlab
169
- $HOME/.local/bin/jupyter lab --ServerApp.base_url=${local.jupyter_base_path} --ServerApp. token='' --ip='*'
162
+ $HOME/.local/bin/jupyter lab --ServerApp.token='' --ip='*'
170
163
EOF
171
164
}
172
165
173
166
resource "coder_app" "jupyter" {
174
167
agent_id = coder_agent.coder.id
175
168
slug = "jupyter"
176
169
display_name = "JupyterLab"
177
- url = "http://localhost:8888${local.jupyter_base_path} "
170
+ url = "http://localhost:8888"
178
171
icon = "/icon/jupyter.svg"
172
+ share = "owner"
173
+ subdomain = true
179
174
180
175
healthcheck {
181
- url = "http://localhost:8888${local.jupyter_base_path} "
176
+ url = "http://localhost:8888/healthz "
182
177
interval = 5
183
178
threshold = 10
184
179
}
185
180
}
186
181
```
187
182
188
- ![ JupyterLab in Coder] ( ../images/jupyterlab-port-forward .png )
183
+ ![ JupyterLab in Coder] ( ../images/jupyter-on-docker .png )
189
184
190
185
191
186
### RStudio
@@ -218,7 +213,7 @@ resource "coder_app" "rstudio" {
218
213
url = "http://localhost:8787/healthz"
219
214
interval = 3
220
215
threshold = 10
221
- }
216
+ }
222
217
}
223
218
```
224
219
@@ -254,7 +249,7 @@ resource "coder_app" "airflow" {
254
249
url = "http://localhost:8080/healthz"
255
250
interval = 10
256
251
threshold = 60
257
- }
252
+ }
258
253
}
259
254
```
260
255
@@ -265,4 +260,4 @@ resource "coder_app" "airflow" {
265
260
If you prefer to run web IDEs in localhost, you can port forward using
266
261
[ SSH] ( ../ides.md#ssh ) or the Coder CLI ` port-forward ` sub-command. Some web IDEs
267
262
may not support URL base path adjustment so port forwarding is the only
268
- approach.
263
+ approach.
0 commit comments