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..353085834 --- /dev/null +++ b/setup/coder-for-docker/upgrade.md @@ -0,0 +1,44 @@ +--- +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, 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, 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: +``` + +## 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 + ```