From 0d9fe482b6e71d413e18d7b86aeff230a605b53b Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Thu, 8 Jun 2023 15:31:55 +0300 Subject: [PATCH 1/4] docs(admin/workspace-proxies): add instructions to run using the Docker image. --- docs/admin/workspace-proxies.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/admin/workspace-proxies.md b/docs/admin/workspace-proxies.md index abed890597298..8df3f6194ce39 100644 --- a/docs/admin/workspace-proxies.md +++ b/docs/admin/workspace-proxies.md @@ -90,6 +90,13 @@ CODER_TLS_KEY_FILE="" coder wsproxy server ``` +### Running from the Docker image + +Modify the entrypoint to +```bash +entrypoint = ["/opt/coder", "wsproxy", "server"] +``` + ### Selecting a proxy Users can navigate to their account settings to select a workspace proxy. Workspace proxy preferences are cached by the web browser. If a proxy goes offline, the session will fall back to the primary proxy. This could take up to 60 seconds. From 68f0e86c0051ac4958d588fa5ed05724c690a546 Mon Sep 17 00:00:00 2001 From: Atif Ali Date: Thu, 8 Jun 2023 13:08:22 +0000 Subject: [PATCH 2/4] make fmt --- docs/admin/workspace-proxies.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/admin/workspace-proxies.md b/docs/admin/workspace-proxies.md index 8df3f6194ce39..2883426ec0620 100644 --- a/docs/admin/workspace-proxies.md +++ b/docs/admin/workspace-proxies.md @@ -93,6 +93,7 @@ coder wsproxy server ### Running from the Docker image Modify the entrypoint to + ```bash entrypoint = ["/opt/coder", "wsproxy", "server"] ``` From 5855abd195b3b80b624168f24683b710d8a6a4e2 Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Fri, 9 Jun 2023 14:34:50 +0300 Subject: [PATCH 3/4] add examples commands different Docker cases --- docs/admin/workspace-proxies.md | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/docs/admin/workspace-proxies.md b/docs/admin/workspace-proxies.md index 2883426ec0620..46321796bc070 100644 --- a/docs/admin/workspace-proxies.md +++ b/docs/admin/workspace-proxies.md @@ -92,10 +92,28 @@ coder wsproxy server ### Running from the Docker image -Modify the entrypoint to +Modify the default entrypoint to run the workspace proxy. + +#### Docker Compose + +change the provided [`docker-compose.yml`](https://github.com/coder/coder/blob/main/docker-compose.yaml) file to include the workspace proxy. + +```diff + image: ghcr.io/coder/coder:${CODER_VERSION:-latest} ++ entrypoint: /opt/coder wsproxy server +``` + +#### Docker run ```bash -entrypoint = ["/opt/coder", "wsproxy", "server"] +docker run --rm -it --entrypoint /opt/coder ghcr.io/coder/coder:latest wsproxy server +``` + +#### Custom Dockerfile + +```Dockerfile +FROM ghcr.io/coder/coder:latest +ENTRYPOINT ["/opt/coder", "wsproxy", "server"] ``` ### Selecting a proxy @@ -103,3 +121,11 @@ entrypoint = ["/opt/coder", "wsproxy", "server"] Users can navigate to their account settings to select a workspace proxy. Workspace proxy preferences are cached by the web browser. If a proxy goes offline, the session will fall back to the primary proxy. This could take up to 60 seconds. ![Workspace proxy picker](../images/admin/workspace-proxy-picker.png) + +``` + +``` + +``` + +``` From f1369759f7527c3304a7861becf0182eec8f494a Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Fri, 9 Jun 2023 14:42:33 +0300 Subject: [PATCH 4/4] Apply suggestions from code review Co-authored-by: Dean Sheather --- docs/admin/workspace-proxies.md | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/docs/admin/workspace-proxies.md b/docs/admin/workspace-proxies.md index 46321796bc070..3549320921da6 100644 --- a/docs/admin/workspace-proxies.md +++ b/docs/admin/workspace-proxies.md @@ -90,13 +90,13 @@ CODER_TLS_KEY_FILE="" coder wsproxy server ``` -### Running from the Docker image +### Running in Docker -Modify the default entrypoint to run the workspace proxy. +Modify the default entrypoint to run a workspace proxy server instead of a regular Coder server. #### Docker Compose -change the provided [`docker-compose.yml`](https://github.com/coder/coder/blob/main/docker-compose.yaml) file to include the workspace proxy. +Change the provided [`docker-compose.yml`](https://github.com/coder/coder/blob/main/docker-compose.yaml) file to include a custom entrypoint: ```diff image: ghcr.io/coder/coder:${CODER_VERSION:-latest} @@ -121,11 +121,3 @@ ENTRYPOINT ["/opt/coder", "wsproxy", "server"] Users can navigate to their account settings to select a workspace proxy. Workspace proxy preferences are cached by the web browser. If a proxy goes offline, the session will fall back to the primary proxy. This could take up to 60 seconds. ![Workspace proxy picker](../images/admin/workspace-proxy-picker.png) - -``` - -``` - -``` - -```