cobyism / ghost-on-heroku

One-button Heroku deploy for the Ghost blogging platform.
MIT License
743 stars 686 forks source link

Ghost upgrades confusion #136

Closed mrneilypops closed 6 years ago

mrneilypops commented 6 years ago

I have been unsuccessful in trying to upgrade my Ghost blog in v1.x I resort to a complete reinstall from the one click deploy each time. I would appreciate some pointers as to where I might be going wrong with git. I have followed the instructions as per; git clone https://github.com/cobyism/ghost-on-heroku cd ghost-on-heroku heroku git:remote -a YOURAPPNAME heroku info git add . git commit -m "Important changes" git push heroku master

For example, I had Ghost v1.19 installed and I wanted to upgrade to v1.20. The above does not upgrade Ghost even with a fresh git clone... Am I missing an important step here?

mars commented 6 years ago

Locally, run npm update, and then commit the changes that made to package.json & package.lock.

Deploy that with git push heroku master.

Once deployment completes, update the database schema via heroku run knex-migrator migrate --mgpath node_modules/ghost.

The whole script should be something like (have not confirmed):

npm update
# …wait…
git commit . -m 'Update package dependencies'
git push heroku master
# …wait…
heroku run knex-migrator migrate --mgpath node_modules/ghost
# …wait…
heroku restart
mrneilypops commented 6 years ago

@mars Thank you very much for the input...but Ghost is still not showing the upgrade v1.19 to v1.20.

screenshot from 2018-01-12 15-42-50

mars commented 6 years ago

That autoupdate banner does not really apply to these Heroku deployments, because they're a Node app based on the npm package. You can disable this banner by updating your Ghost's config:

heroku config:set privacy__useUpdateCheck=false

As far as your Ghost being on an older version: maybe npm update did not upgrade it all the way. You can try setting the version explicitly with:

npm install ghost@^1.20.0

…and then commit, deploy, & migrate.

mrneilypops commented 6 years ago

@mars Thanks again but still no success with an upgrade... I have tried various combinations of commands but still no joy. As I have very few posts on my blog I have decided to export/import .json files and redeploy the one-click install when a Ghost update is available. I will monitor for any additional info and also the required Ghost feature of 'one-click update'

Cheers, Neil

https://mrneilypops.org

screenshot from 2018-01-12 19-21-27

ifvictr commented 6 years ago

@mrneilypops Did you make sure you deployed it after updating the repo?

mars commented 6 years ago

ghost-on-heroku is just a Node/Express app with Ghost as a package.json dependency.

Upgrades work like any other npm module, plus you may need to run the knex database schema migrations.