From 53c54bc55fc5c2021ddbccc62ffb30104d38001e Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Mon, 7 Feb 2022 19:12:12 +0000 Subject: [PATCH] Correct command for starting just the DB --- content/posts/upgrading-docker-databases.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/posts/upgrading-docker-databases.md b/content/posts/upgrading-docker-databases.md index 16be09f..f78c8d1 100644 --- a/content/posts/upgrading-docker-databases.md +++ b/content/posts/upgrading-docker-databases.md @@ -25,7 +25,7 @@ There are [ways](https://github.com/tianon/docker-postgres-upgrade) around this, 4. Stop the database (`docker-compose down`) 5. Remove the contents of the database directory, wherever you've mounted in `/var/lib/postgres` 6. Update the tag you are using, and pull the new container (`postgres:12-alpine` → `postgres:14-alpine`) -7. Start just the database (`docker-compose up -d`). This will recreate a fresh database, using the credentials from the environment. +7. Start just the database (`docker-compose up -d db`). This will recreate a fresh database, using the credentials from the environment. 8. Import the data into the new database (`psql -U username < data.sql`) 12. Stop the database container (`docker-compose down`) 13. Start everything (`docker-compose up -d`)