From 5f86df62176a1fe804b90ab3c1890250d72a14d1 Mon Sep 17 00:00:00 2001 From: Fabian Hagen Date: Wed, 30 Mar 2022 16:56:58 +0200 Subject: [PATCH 1/4] Updated instructions on how to upgrade with docker compose --- setup/upgrade/index.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/setup/upgrade/index.md b/setup/upgrade/index.md index aeaba8130..1ec9dff82 100644 --- a/setup/upgrade/index.md +++ b/setup/upgrade/index.md @@ -40,6 +40,32 @@ This guide will show you how to upgrade your Coder deployment. ## Upgrade Coder +### Docker Compose + +If you use Docker Compose to run your Coder instance, you need to adjust the version in your `docker-compose-yml`, e.g.: + +```yml +# ... +services: + coder: + image: docker.io/codercom/coder:1.29.0 + # ... +``` + +Now you can recreate your image by running: + +1. Recreate the image + ```console + docker-compose up --force-recreate --build -d + ``` + +2. Start the container + ```console + docker-compose up + ``` + +### Helm + 1. Retrieve the latest repository information: ```console From 4e072e98e4cbd79398a324c78720cdd6caeee39b Mon Sep 17 00:00:00 2001 From: Katie Horne Date: Mon, 4 Apr 2022 14:18:14 -0500 Subject: [PATCH 2/4] chore: update Docker upgrade instructions --- manifest.json | 3 +++ setup/coder-for-docker/local.md | 19 +++++++------- setup/coder-for-docker/upgrade.md | 43 +++++++++++++++++++++++++++++++ setup/upgrade/index.md | 26 ------------------- 4 files changed, 55 insertions(+), 36 deletions(-) create mode 100644 setup/coder-for-docker/upgrade.md diff --git a/manifest.json b/manifest.json index aa61dcf87..2b91f5c94 100644 --- a/manifest.json +++ b/manifest.json @@ -204,6 +204,9 @@ }, { "path": "./setup/coder-for-docker/postgres.md" + }, + { + "path": "./setup/coder-for-docker/upgrade.md" } ] }, diff --git a/setup/coder-for-docker/local.md b/setup/coder-for-docker/local.md index 2f0411c1c..55e350728 100644 --- a/setup/coder-for-docker/local.md +++ b/setup/coder-for-docker/local.md @@ -43,7 +43,7 @@ Coder for Docker works with the following platforms: only run this if you'd like a clean install. 1. In the terminal, run the following to download the resources you need, - include the images, and set up your Coder deployment (if you're using the + including the images, and set up your Coder deployment (if you're using the terminal in Docker Desktop, omit the slashes and run as a single-line command): @@ -72,9 +72,8 @@ Coder for Docker works with the following platforms: 1. Launch a web browser and navigate to the URL provided by Coder (e.g., `http://localhost:7080`). Log in using the credentials Coder provided. -1. At this point, you can [create a workspace](../workspaces/create.md) using - one of the **Packaged** images by clicking on **New workspace** in the center - of the UI. +1. [Create a workspace](../workspaces/create.md) using one of the **Packaged** + images by clicking on **New workspace** in the center of the UI. At this point, you're ready to use your workspace. See our [getting started guide](../getting-started/docker.md) for detailed instructions @@ -210,17 +209,17 @@ If you're interested in using Docker as a workspace provider, please see our ## Accessing the local PostgreSQL database -To query the local PostgreSQL database using the `psql` [terminal-based -front-end](https://www.postgresql.org/docs/13/app-psql.html), follow these -steps. +To query the local PostgreSQL database using the `psql` +[terminal-based front-end](https://www.postgresql.org/docs/13/app-psql.html), +follow these steps. 1. Run `docker ps` to get the name of the Coder container. 1. Exec into the Coder container and connect to the database. - ```console - docker exec -it psql --username=coder --host=0.0.0.0 --port=5433 --dbname=postgres - ``` +```console +docker exec -it psql --username=coder --host=0.0.0.0 --port=5433 --dbname=postgres +``` ## Known issues diff --git a/setup/coder-for-docker/upgrade.md b/setup/coder-for-docker/upgrade.md new file mode 100644 index 000000000..b91af859d --- /dev/null +++ b/setup/coder-for-docker/upgrade.md @@ -0,0 +1,43 @@ +--- +title: "Upgrade" +description: Learn how to upgrade your Coder for Docker deployment. +--- + +This guide will show you how to upgrade your Coder for Docker deployment. + +To upgrade, rerun the following command to download the resources you need, +including the latest images: + +```console +docker run --rm -it \ + -p 7080:7080 \ + -v /var/run/docker.sock:/var/run/docker.sock \ + -v ~/.coder:/var/run/coder \ + codercom/coder:1.29.0 +``` + +## Docker Compose + +If you use Docker Compose to run Coder, here's how to upgrade your deployment: + +1. Update the Coder the version in your `docker-compose-yml` file: + + ```yml + # ... + services: + coder: + image: docker.io/codercom/coder:1.29.0 + # ... + ``` + +1. Recreate your image: + + ```console + docker-compose up --force-recreate --build -d + ``` + +1. Start the container: + + ```console + docker-compose up + ``` diff --git a/setup/upgrade/index.md b/setup/upgrade/index.md index 1ec9dff82..aeaba8130 100644 --- a/setup/upgrade/index.md +++ b/setup/upgrade/index.md @@ -40,32 +40,6 @@ This guide will show you how to upgrade your Coder deployment. ## Upgrade Coder -### Docker Compose - -If you use Docker Compose to run your Coder instance, you need to adjust the version in your `docker-compose-yml`, e.g.: - -```yml -# ... -services: - coder: - image: docker.io/codercom/coder:1.29.0 - # ... -``` - -Now you can recreate your image by running: - -1. Recreate the image - ```console - docker-compose up --force-recreate --build -d - ``` - -2. Start the container - ```console - docker-compose up - ``` - -### Helm - 1. Retrieve the latest repository information: ```console From 75f5d234f7bbd8bd811d6104251f91f7f8d7f13d Mon Sep 17 00:00:00 2001 From: Katie Horne Date: Mon, 4 Apr 2022 14:27:00 -0500 Subject: [PATCH 3/4] chore: update wording --- setup/coder-for-docker/upgrade.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setup/coder-for-docker/upgrade.md b/setup/coder-for-docker/upgrade.md index b91af859d..2092d7115 100644 --- a/setup/coder-for-docker/upgrade.md +++ b/setup/coder-for-docker/upgrade.md @@ -5,8 +5,9 @@ description: Learn how to upgrade your Coder for Docker deployment. This guide will show you how to upgrade your Coder for Docker deployment. -To upgrade, rerun the following command to download the resources you need, -including the latest images: +To upgrade, run the following command to download the resources you need, +including the latest images (ensure that you're providing the correct version +number in the command): ```console docker run --rm -it \ From fc7f81aeb087e7168ea1bcf6251d43f26e74d855 Mon Sep 17 00:00:00 2001 From: Katie Horne Date: Mon, 4 Apr 2022 16:34:55 -0500 Subject: [PATCH 4/4] Update upgrade.md --- setup/coder-for-docker/upgrade.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup/coder-for-docker/upgrade.md b/setup/coder-for-docker/upgrade.md index 2092d7115..353085834 100644 --- a/setup/coder-for-docker/upgrade.md +++ b/setup/coder-for-docker/upgrade.md @@ -7,14 +7,14 @@ This guide will show you how to upgrade your Coder for Docker deployment. To upgrade, run the following command to download the resources you need, including the latest images (ensure that you're providing the correct version -number in the command): +number in the command, e.g., `1.29.0`): ```console docker run --rm -it \ -p 7080:7080 \ -v /var/run/docker.sock:/var/run/docker.sock \ -v ~/.coder:/var/run/coder \ - codercom/coder:1.29.0 + codercom/coder: ``` ## Docker Compose