I installed Joplin in my synology with docker (with Portainer) following this article one month ago.
It worked well until yesterday. The container Joplin-db-1 keeps restarting. Log of Joplin-db-1 container shows:
PostgreSQL Database directory appears to contain a database; Skipping initialization
2022-10-18 04:59:12.704 UTC [1] FATAL: database files are incompatible with server
2022-10-18 04:59:12.704 UTC [1] DETAIL: The data directory was initialized by PostgreSQL version 14, which is not compatible with this version 15.0 (Debian 15.0-1.pgdg110+1).
And Docker’s logs show:
Start container joplin-db-1 failed: {"message":"failed to initialize logging driver: database is locked"}.
You have made a update from Postgres 14 to 15 in your docker environment!
Yuse again a docker postgres 14 container and I think everything works again.
Allrighty !!
I just adress my problem ... actually it is pretty simple
Stop your related containers
Edit your stack by adding the version that works to the database type name for exemple : image: postgres:14.5
Don't forget to do it on each line where there is image : postgres
That was the solution for me, both Joplin and firefly failed after update but now since the 14.5 version in written in the stack it will be the right version to be pulled.
A least until I update the stacks with the next version of postgresql
Bless you all !
Yes , I am an atheist who bless people when he is happy !! we exist !!
Joplin works perfectly with PostgreSQL 15. The problem you have here is that you can't simply update your postgres container between two major postgres updates. You have to export your v14 database, create a new v15 container, and then re import the database in the new container. Here is how I'm doing it:
docker compose down
docker compose up -d db
docker compose exec -it db pg_dumpall -U joplin > data.sql
docker compose down
Create a new data directory :
mv data data.bak
mkdir data
Update the tag you are using (postgres:14-alpine → postgres:15-alpine) in docker-compose.yml
docker compose up -d db
docker compose exec -T db psql -U joplin < data.sql