-
Notifications
You must be signed in to change notification settings - Fork 314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documentation on updating Ghost #309
Comments
Yeah, this type of upgrade is a little bit complicated all around 😬 I think the best I can suggest is maybe a little blurb added to the very top of https://github.com/docker-library/docs/blob/master/ghost/content.md (maybe moving up the existing "Upgrading Ghost" section)? Does it already / do you think it would be possible/reasonable to have the newer versions balk with a useful error message on startup/migration if you haven't done this, perhaps linking to those docs? 😅 |
I've just completed two docker based ghost upgrades and it was flawless. I thought I'd note down my approach for anyone who might find it useful, I'm not sure how useful it'll be for the future documentation proposed but maybe it'll help a little. I'm using docker-compose for them both so here's the steps I went through.
This process worked for me with the various container versions above for two seperate sites on a dedicated My final docker-compose file for both sites is:
(This fits my needs, other people may need ports and volumes configured slightly differently). Hopefully this helps in someway! Edit: I've expanded on this comment in a blog post. It covers a few approaches for taking a backup amongst other things You can find it here - https://www.elliotblackburn.com/upgrading-to-ghost-5/ |
I just want to be clear, Ghost team are responsible for maintaining Ghost-CLI which already has protections built-in to make sure updates are smooth and correct. Our small team doesn't currently have capacity to also manage the docker process, and we don't use docker much as a team/org, so we aren't best placed to do the work either 😬 If anyone wants to get creative with changes to Ghost to prevent bad updates, I'm totes here for code reviews and merges though. If someone is up for writing a proper upgrade guide, I'm also happy to link to it from the official docs 🙂 |
Might also be worth adding a note about not pinning I'm not sure if it would be considered "On Topic" for this section, but it might also be a good idea to mention breaking changes like #323. Arguably, this is called out in Ghost's documentation directly, but somehow I still managed to miss that I should have moved to MySQL as part of the 5.0 update and only found out when updating minor versions thanks to someone on twitter who pointed me to that PR. Given that the officials docs recommend "Full Reinstall" for the migration, I think it would be worthwhile to point out what that migration path looks like for Docker users. If folks would like, I'd be happy to work on a PR to that effect or at least write up what I learned doing mine. |
I would like to chime in - I am looking to try out Ghost and so far have not been able to install it. On one hand, I tried to install locally using Ghost-CLI but ran into the issue of being on Node 19, with Ghost only supporting Node 18 and lower. Since in the past I've had a huge pain managing different Node versions and really prefer to stay on the latest stable branch, I thought okay I'll try the Docker image - I mean it's suggested right there in the docs. Unfortunately the docs are out of date and the image doesn't work (getting "Unknown database error"). Given that you're not on the latest version of Node I would think support for the Docker image would be doubly important as it gives developers a way to know they are on the right version without worrying. So far I haven't been able to get started with Ghost which is too bad because I really like the idea of a modern NodeJS based CMS. |
I've put together a slightly more thorough guide for the upgrade from Ghost 4 to 5 on my blog. It's an expansion of what I wrote in my prior comment but I've walked through the process with a test blog again and tried to make it slightly more accessible. I've included a starting state and ending state along with some of the notes @ErisDS mentioned. You can find it here: https://www.elliotblackburn.com/upgrading-to-ghost-5/ Please excuse the poor colours on dark mode, it looks like the theme doesn't have great colour choices for code snippets there. All the content is there but light mode might make for better reading until I can make the fix later today. I could put together another walk through of setting up a ghost blog from scratch via docker-compose if that would be useful to anyone. It would be mostly just explaining the yaml file I'm using and linking out to the ghost docs for customisation. I don't think it's unreasonable for the Ghost team to say they don't support this method of deployment right now though. They only have limited resources after all and can't tackle everything. The notes they've provided in this issue are already going beyond their stated official support. |
With the release of Ghost v5 we have spent quite a lot of time carefully crafting update docs
https://ghost.org/docs/update
However, they are for the recommended install method which is Ghost CLI. We use the CLI to do a lot of the legwork and prevent issues with updates.
With docker, I'm not sure there's any way we can do anything to prevent people updating incorrectly, but it seems there should probably be detailed update docs?
The critical details being:
To clarify that last point, if you're on 3.25.9, you need to update Ghost to 3.42.9 - including starting the server to trigger the migrations - before updating to v5.0.0.
Note: you don't have to cycle through every major - you don't have to upgrade to v4 first.
There's absolutely no way to guarantee you can update from any version to any version without data loss or corruption as there can always be bugs that are fixed in later versions 🤷♀️
The text was updated successfully, but these errors were encountered: