lemmy/scripts/postgres_12_to_15_upgrade.sh
Daniel Lo Nigro 8abbd56400
Switch PostgreSQL container to use pgautoupgrade (#4892)
* Switch PostgreSQL container to use pgautoupgrade

This handles automatically upgrading the data files to newer versions of PostgreSQL.

* Fixing other uses of postgres:16-alpine image.

* Simplifying upgrade scripts.

---------

Co-authored-by: Dessalines <tyhou13@gmx.com>
2024-07-17 09:59:21 +02:00

8 lines
237 B
Bash
Executable file

#!/bin/sh
set -e
echo "Updating docker-compose to use postgres version 16."
sudo sed -i "s/image: .*postgres:.*/image: pgautoupgrade\/pgautoupgrade:16-alpine/" ./docker-compose.yml
echo "Starting up lemmy..."
sudo docker-compose up -d