Skip to content

Commit

Permalink
Update PostgreSQL 16 to 17
Browse files Browse the repository at this point in the history
Follow these steps in order to migrate from PostgreSQL 16 to 17 :
- Make a SQL backup
- Install PostgreSQL 17
- Drop the database created by FitTrackee

docker exec -i fittrackee pg_dumpall \
 -U fittrackee > postgres-backupv16.sql
docker stop fittrackee-db fittrackee
mv fittrackee-db fittrackee-db.16
docker compose pull && docker compose up -d
docker cp postgres-backupv16.sql fittrackee-db:/tmp
docker stop fittrackee
docker exec -it fittrackee-db bash
su - postgres
psql -U fittrackee
DROP DATABASE fittrackee WITH (FORCE);
CREATE DATABASE fittrackee;
psql -U fittrackee < postgres-backupv16.sql
ALTER USER fittrackee WITH PASSWORD 'fittrackee'
docker restart fittrackee-db fittrackee

Test the FitTrackee with PostgreSQL see equipments.
If you're sure all is working as expected you can remove old PostgreSQL data
directory :
rm -rf fittrackee-db.16
  • Loading branch information
DavidHenryThoreau committed Oct 10, 2024
1 parent 5bd4a42 commit 1bfac02
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ services:
restart: unless-stopped

fittrackee-db:
image: postgres:16-alpine
image: postgres:17-alpine
container_name: fittrackee-db
environment:
- PUID=1000
Expand Down

0 comments on commit 1bfac02

Please sign in to comment.