Hacks by Ruddra

Migration from Ghost 0.11 to 1.XX Using Docker

Ghost had formulated lots changes when they released version 1.XX. So, when you try to upgrade from 0.11 to 1.XX, you can follow the following steps:


FYI, you can also use the following steps if you want run Ghost in Docker and import your existing settings. Just Skip Step 1, 2, 7, 8.

1. Run your Ghost server and go to adminsite by localhost:2368/admin or localhost:2368/ghost (assuming its running in 2368 port). Now go to Labs>Export Your Content. Click there and export your backup json file. export 2. Renamed your content directory as old content and copy your exiting images, themes from that directory and put them in new folder named content.

3. Copy content directory to a seperate folder where your dockerized ghost files will exist.

4. Create a docker-compose.yml file like this:

version: "2"
  image: ghost:latest
  container_name: g01
    - "2368:2368"
    - ./content/images:/var/lib/ghost/content/images
    - ./content/themes:/var/lib/ghost/content/themes
    - ./content/apps:/var/lib/ghost/content/apps
    - ./content/data:/var/lib/ghost/content/data

Here you can see that your content directory is syncing with Ghost container’s content directory through volume sharing. BTW you need to have python and docker-compose in your local machine. Install docker compose by pip install docker-compose

5. Now, run docker-compose up. It will start up your ghost server. Access it via localhost:2368. 6. For new Ghost users and those whom are migrating, you need to go adminsite using localhost:2368/admin and setup your ghost admin. 7. This step is also for migration. Go to Labs>Import Your Content, then import the json file from Step 2. import 8. This step is also for migration only. Go to Design section in admin site. You can see the themes which can be used in here. FYI, if your theme does not appear, don’t worry. THEME

  • Just create a zip file of your particular theme in themes folder.
  • In adminsite>Design section, click on upload a theme. Then try to upload the zip file. It will show errors where the changes needs, fix the errors, and import again.

9. One important thing to mention, if you update any handlebar files in the theme, then you need to restart the docker container to see the change in the frontend. Just run docker-compose stop and docker-compose start.

Thats it. You have a docker powered ghost blog :).

You can find a working example here.

Share Your Thoughts
M ↓   Markdown