Move a self-hosted Financy to a newer release, keeping the household's records. Run every command on your computer, in the repository you deployed from, unless it says the server.
You need a server set up as Self-host Financy says, with backups on.
Read what changed since your release, at financy.dev/changelog.
Back up now, on the server, in Financy's folder, and wait for the line
Backup done.:deno task compose run --rm backup onceFetch the releases and check out the new one.
git tag --sort=-v:refnamelists them, newest first:git fetch --tags git switch --detach v0.2.0Compare your env file with the example, and add any variable the new release needs:
git diff v0.1.0 v0.2.0 -- infra/envs/.env.exampleDeploy:
deno task deployCheck that Financy answers. It must print
"status":"ok"and200:curl -sS -w '\n%{http_code}\n' https://money.example.com/api/healthFor up to a minute after the deploy it can answer
404 page not found, until the new API passes its health check; try again.
Use your own release tags in place of v0.1.0 and v0.2.0.
Every deploy applies the new release's database migrations before the API and the worker start. A
failed migration fails the deploy, and the new release's API and worker do not start. On the
server, deno task compose logs migrate shows what it did.
The deploy also refuses an env file in which a secret is empty or still the example's value, and names each one.
Going back to the old release does not undo a migration. When the new release fails after its
migrations ran, restore the backup from step 2 as Restore from a backup (on GitHub)
says, then deploy the old tag. In the restore's first step, stop pgbouncer too: while it runs,
it holds the database open, and the rename in the second step fails with "being accessed by other
users". Deploy an update (on GitHub) has the details of every deploy and of rolling
back.