A newsletter you run on your own server

Docs

Upgrading

Run the new version. Migrations run each time the server starts. Read what changed first.

Paste this into your agent

Upgrade my Mailpiece install to the latest version. Read mailpiece.dev/docs/upgrading.md first.

With Docker

docker pull ghcr.io/mailpiece/mailpiece:main
docker stop mailpiece
docker rm mailpiece
docker run -d --name mailpiece ...   # the same command as before

# With docker compose
docker compose pull
docker compose up -d

With Kamal

A pull leaves your destination and secrets files alone. Kamal switches over when the new container passes its health check.

git pull
bundle install
bin/kamal deploy -d production

Going back

Docker: run a build's commit tag, such as sha-1a2b3c4, instead of main. Kamal: bin/kamal rollback VERSION -d production starts the previous container.

Going back does not undo migrations. If the database changed, restore from a backup.

Still need help? Ask on GitHub.