diff --git a/docs/ides/web-ides.md b/docs/ides/web-ides.md index bc39915e7c..36b09ec70d 100644 --- a/docs/ides/web-ides.md +++ b/docs/ides/web-ides.md @@ -139,7 +139,7 @@ projector: - PyCharm ([Docker](https://github.com/sharkymark/v2-templates/tree/main/docker-with-pycharm), - [Kubernetes](https://github.com/sharkymark/v2-templates/tree/main/multi-projector-pycharm) + [Kubernetes](https://github.com/sharkymark/v2-templates/tree/main/multi-projector-pycharm)) > You need to have a valid `~/.kube/config` on your Coder host and a namespace > on a Kubernetes cluster to use the Kubernetes pod template examples. @@ -153,20 +153,13 @@ Configure your agent and `coder_app` like so to use Jupyter: ```hcl data "coder_workspace" "me" {} -## The name of the app must always be equal to the "/apps/" -## string in the base_url. This caveat is unique to Jupyter. - -locals { - jupyter_base_path = "/@${data.coder_workspace.me.owner}/${data.coder_workspace.me.name}/apps/JupyterLab/" -} - resource "coder_agent" "coder" { os = "linux" arch = "amd64" dir = "/home/coder" startup_script = <<-EOF pip3 install jupyterlab -$HOME/.local/bin/jupyter lab --ServerApp.base_url=${local.jupyter_base_path} --ServerApp.token='' --ip='*' +$HOME/.local/bin/jupyter lab --ServerApp.token='' --ip='*' EOF } @@ -174,18 +167,20 @@ resource "coder_app" "jupyter" { agent_id = coder_agent.coder.id slug = "jupyter" display_name = "JupyterLab" - url = "http://localhost:8888${local.jupyter_base_path}" + url = "http://localhost:8888" icon = "/icon/jupyter.svg" + share = "owner" + subdomain = true healthcheck { - url = "http://localhost:8888${local.jupyter_base_path}" + url = "http://localhost:8888/healthz" interval = 5 threshold = 10 } } ``` -![JupyterLab in Coder](../images/jupyterlab-port-forward.png) +![JupyterLab in Coder](../images/jupyter-on-docker.png) ### RStudio @@ -218,7 +213,7 @@ resource "coder_app" "rstudio" { url = "http://localhost:8787/healthz" interval = 3 threshold = 10 - } + } } ``` @@ -254,7 +249,7 @@ resource "coder_app" "airflow" { url = "http://localhost:8080/healthz" interval = 10 threshold = 60 - } + } } ``` @@ -265,4 +260,4 @@ resource "coder_app" "airflow" { If you prefer to run web IDEs in localhost, you can port forward using [SSH](../ides.md#ssh) or the Coder CLI `port-forward` sub-command. Some web IDEs may not support URL base path adjustment so port forwarding is the only -approach. \ No newline at end of file +approach. diff --git a/docs/images/jupyter-on-docker.png b/docs/images/jupyter-on-docker.png new file mode 100644 index 0000000000..634206d063 Binary files /dev/null and b/docs/images/jupyter-on-docker.png differ diff --git a/docs/images/jupyterlab-port-forward.png b/docs/images/jupyterlab-port-forward.png deleted file mode 100644 index 6cfbd1a340..0000000000 Binary files a/docs/images/jupyterlab-port-forward.png and /dev/null differ