The latest release of Ghost is now supported! Changes include:
HEROKU_URLconfig var renamed to
PUBLIC_URLto avoid using Heroku's namespace
https://YOURAPPNAME.herokuapp.com/ghostto set up your admin account
PUBLIC_URLenvironment variable accordingly
Optionally after deployment, to push Ghost upgrades or work with source code, clone this repo (or a fork) and connect it with the Heroku app:
git clone https://github.com/m1guelpf/ghost-heroku cd ghost-heroku heroku git:remote -a YOURAPPNAME heroku info
Then you can push commits to the Heroku app, triggering new deployments:
git add . git commit -m "Important changes" git push heroku master
Watch the app's server-side behavior to see errors and request traffic:
heroku logs -t
See more about deploying to Heroku with git.
On each deployment, the Heroku Node/npm build process will auto-upgrade Ghost to the newest 1.x version. To prevent this behavior, use npm 5+ (or yarn) to create a lockfile.
npm install git add package-lock.json git commit -m 'Lock dependencies' git push heroku master
Now, future deployments will always use the same set of dependencies.
To update to newer versions:
npm update git add package-lock.json git commit -m 'Update dependencies' git push heroku master
Newer versions of Ghost frequently require changes to the database. These changes are automated with a process called database migrations.
After upgrading Ghost, you may see errors logged like:
DatabaseIsNotOkError: Migrations are missing. Please run knex-migrator migrate.
To resolve this error, run the pending migrations and restart to get the app back on-line:
heroku run knex-migrator migrate --mgpath node_modules/ghost heroku restart
This can be automated by adding the following line to
release: knex-migrator migrate --mgpath node_modules/ghost
If you have problems using your instance of Ghost, you should check the official documentation or open an issue on the official issue tracker. If you discover an issue with the deployment process provided by this repository, then open an issue here.
Released under the MIT license, just like the Ghost project itself.