Releases: PostOwl/postowl
v0.1.2
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.
- Make a note of your fly appname (the subdomain in https://appname.fly.dev).
- 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
- 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
-
Update
.env.production
with the new format from.env.production.example
-
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.
- 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
-
Run
fly deploy
-
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.
v0.1.1
Thanks to everyone who tried the first release of PostOwl.
Today we're releasing some updates based on early feedback.
If you've already got a PostOwl deployment on fly.io you can update by pulling the latest changes and redeploying. Make sure to read the notes here as you'll need to edit some files and change your deployment command. (Future updates will be much simpler, so please bear with us for this release!)
Simplified and more reliable deployment to fly.io
If you already have a PostOwl deployment, follow the steps below to update. (If it's your first time deploying, you can follow the deployment docs and ignore this section.)
- Get the latest release to your local repo:
git fetch --tags
thengit checkout tags/v0.1.1
(or you cangit pull
if you want to get the latest changes onmain
.) - Rename
.env.production.example
to.env.production
and edit the values for your site (this means we won't need the 'BUILD-SECRETS' that were previously needed when deploying). - You'll need to make some changes to
fly.toml
(see the updated example infly.toml.example
). Specifically, change line 19 to readcmd = ["start-fly.sh"]
and line 32 to readauto_stop_machines = true
- Run
fly deploy
That's it! Future deploys will just be getting the latest changes from the repo and running fly deploy
!
Scale to Zero on fly.io
'Scale to zero' means that when your site is inactive, the machine will automatically shutdown. This saves costs and electricity. For low traffic personal sites it's ideal.
In the past, the problem with shutting down is that it would take some time for your site to start up again - remember the Heroku free plan?! Fly.io use firecracker vms which start almost instantly. If your site goes to sleep, you'll hardly notice it starting up. In our tests it takes about one second for the server to respond to an http request from a cold start! 🔥
The default configuration in PostOwl has auto_stop_machines = true
in fly.toml.example
. We recommend you keep this setting. We have code that gracefully closes the database connection and shuts down the application server before the machine stops.
Now you can have the benefits of a dynamic web application without the costs of keeping a VPS up all the time. And you're being kind to the environment! 🌳
Minor changes
- Fixed search for non-signed in users
- Improved 'Send' and 'Save' buttons to be more context aware. We now show 'Publish' when making a letter public for the first time.
- Added 'New Letter' button in the header for signed-in users. Based on feedback this makes the main creative call to action obvious and gives a visual indicator that you're signed in.
First public release!
This is the first public release of PostOwl 🙌
It's a technical preview for people who are comfortable hosting it themselves. We provide instructions for doing this on the documentation website.
The application is stable for general use, but please don't trust important data to it yet without making backups and copies of your SQLite database.
Please share any issues you find.
Thanks for trying PostOwl!