A small companion post to my Ghost on Fly tutorials:
You’ve gotten your site all set up on Fly’s free tier, and it’s looking spiffy. But the Ghost developers move fast, and next thing you know there’s a new version out — and it has a feature you want, or a critical security update. How do we update a Ghost site on Fly?
As it turns out, quite simply!
- Backup your site! Don’t skip this step.
fly deployfrom the directory containing your
fly.toml. Or, run
fly deploy -a APPNAMEfrom anywhere, replacing APPNAME with (duh) your Fly app name.
What does this do? It creates a new Fly “release”. Since we’re using the community-maintained Ghost docker image, when a new release is deployed, it will pull the latest image with the specified tag from the Docker Hub.
We’re using the
5-alpine tag. This means every time we deploy, we get the latest Ghost 5 image. When Ghost 6 is released, we’ll have to update the image tag; we won’t want to automatically update to Ghost 6, since it may have breaking changes. If you want to pin your blog at a specific version for some reason, you can use the tag for a more-specific version number (for example,
Note: the Ghost Docker image is officially an unofficial way of running Ghost, and updates to the docker image generally land a few hours or days after Ghost updates are released.
If you’re running Ghost + MySQL on Fly (as opposed to Ghost + SQLite), you’ll probably also want to
fly deploy the latest MySQL 8 docker image to your database instance once in a while.