Can a kind soul help with upgrading old docker 1.4.1?

A long time ago we installed CodiMD 1.4.1 using docker, following the official docker deployment method (from the docs) at the time.

Since then we created a ton of docs.

Is there a working upgrade tutorial to the latest HedgeDoc? If not, can a kind soul assist with the steps?

Migrating from CodiMD 1.4 should be safe. You should be able to upgrade directly to HedgeDoc 1.9.

Have a look at our upgrade docs for Docker for more information. Remember to always back up the data before attempting an upgrade.

@davidmehren many thanks for getting back.

Hmm, I tried to go through the steps of the upgrade docs for Docker, and got an error at the very first one

# docker-compose exec database createuser --superuser -Uhackmd postgres
createuser: could not connect to database postgres: FATAL:  role "hackmd" does not exist

Also, call me thick, but I don’t see any upgrade instructions. There is a single sentence saying “you should be able to swap the docker image for ours” … but no actual instructions. Surely replacing the docker-compose.yml with the contents shown here Docker Image - HedgeDoc won’t work … i also have a separate postgres 11.5 docker as part of my codimd 1.4.1 docker deployment.

Are you saying only the two image: lines should be replaced, one with postgresql 13 and the other with hedgehog? What about the postgres user commands above that failed?

Hmm, that looks like you used a different postgres superuser when setting up CodiMD.
You should have a line containing POSTGRES_USER in your docker-compose.yml, which defines your superuser. Try using that username for the first command, so docker-compose exec database createuser --superuser -U<your superuser> postgres.
You can also post you docker-compose.yml so I can take a look.

You can replace the line defining the old image (should look something like image: quay.io/codimd/server:1.4.1) with image: quay.io/hedgedoc/hedgedoc:1.9.0 and then run docker-compose up. That takes care of updating HedgeDoc.

Upgrading the Postgres database from 11.5 to 13 is a separate step, which we are working on adding to our documentation. You can take a look at a draft at Migration of PostgreSQL 9.6 to PostgreSQL 13 - HedgeDoc. It refers to Postgres 9.6, but upgrading a later version to 13 works in the same way.