Skip to content

chadly/ghost

Repository files navigation

Ghost on Azure App Service

This is my fork of Ghost 3.0 with changes to run on Azure App Service. Read here for a full introduction.

Branches

This repo is setup with a few branches for easier maintenance. The ghost branch is where I commit the Ghost releases as they come out unchanged. The azure branch (the default branch) is where I make only the changes necessary to get it running on Azure App Service. I merge the ghost branch into this branch as new releases come out. I then create a separate branch for each site I deploy. This way I can make theme customizations and tweaks to individual sites and rebase those changes off of the azure branch.

Changes on the Azure Branch

  • Force config.js to get the port it should run on from PORT env variable instead of SERVER_PORT. This is to make iisnode happy.
  • Add web.config & iisnode.yml - standard stuff to host node on IIS.
  • Add support for HSTS headers. Technically, this isn't required to get Ghost running on Azure, but you should probably do it anyway.

To see these changes in detail, see the branch comparison.

How to Run Locally

Make sure you have the latest Node LTS release installed. Install the latest version of Yarn. Clone this repo and run the following in terminal:

yarn
yarn start

This will install dependencies and then start the Ghost development server. If you haven't already, Ghost will automatically setup your sqlite database in /content/data/ghost.db (or migrate it to the latest version if it already exists). You should see something like this in your terminal:

INFO Ghost is running in development...
INFO Listening on: 127.0.0.1:2368
INFO Url configured as: http://localhost:2368/
INFO Ctrl+C to shut down
INFO Ghost boot 3.455s

Open the configured URL in your web browser and you should see the default Ghost installation. Navigate to /ghost to setup the site.

Head on over to the Ghost Development Documentation for more information on how to setup and develop with Ghost.