Skip to content

v0.1.2

Latest
Compare
Choose a tag to compare
@keybits keybits released this 03 Aug 20:53
· 31 commits to main since this release
26f0ab6

This release changes deployment to fly.io quite significantly. Based on feedback from them we're making the first deploy use fly launch instead of the previously documented approach. The changes also set us up for more easily supporting your own domain / custom subdomains for a hosted version.

If you're deploying PostOwl for the first time, follow the deployment docuemantion.

If you have an existing deployment and you want to keep the data in your database and reuse it, there's a bit of work to do as documented below. Sorry about this! We don't anticipate any more changes that would require this much work. In the future, updating will be a case of just a couple of commands.

How to upgrade an existing PostOwl installation for this release.

  1. Make a note of your fly appname (the subdomain in https://appname.fly.dev).
  2. Backup your database:
# make sure you're in your PostOwl directory
fly ssh console
sqlite3 data/db.sqlite3 ".backup data/backup-db.sqlite3"
# ctrl+d to exit console
fly sftp get data/backup-db.sqlite3 data/backup-db.sqlite3
  1. Get the latest version of PostOwl and clean up files:
git fetch --tags
git checkout tags/v0.1.2
# or you can git pull if you want to get the latest changes on main
rm Dockerfile fly.toml
  1. Update .env.production with the new format from .env.production.example

  2. Destroy your existing app and launch a replacment:

fly apps destroy appname
fly launch

Respond to the prompts. You can reuse the appname you previously had or choose a new one. If you reuse the appname it can take an hour or two to be available again while DNS records sort themselves out.

  1. Edit the files generated by fly launch:

In fly.toml after [base] add:

[experimental]
  cmd = ["/app/scripts/start-fly.sh"]
  entrypoint = ["sh"]

In Dockerfile, replace RUN npm run build with RUN mkdir /data && npm run build

  1. Run fly deploy

  2. Restore your database:

fly ssh console
rm data/db.*
# ctrl+d to exit console
fly sftp shell
cd /data
put data/backup-db.sqlite3 db.sqlite3
# ctrl+d to exit console

You should now be up and running. In the future updaing will be just a couple of commands.