Docker Ghost (v2) image used on play-with-ghost.com
Clone or download
Pull request Compare This branch is 109 commits ahead, 85 commits behind docker-library:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
.stickler.yml
.travis.yml
Dockerfile
MAINTAINERS.md
README.md
docker-entrypoint.sh
runup.sh

README.md

 

FirePress

FirePress.org | play-with-ghost | GitHub | Twitter

version Downloads CICD build

 

ghostfire

What is this?

It’s a Docker image to run Ghost V2 in a container. Fully compatible with a simple docker run, Kubernetes or Docker Swarm.

What is Ghost? — Ghost is an open source software that lets you create your website with a blog. See the FAQ section for more details.

Source: https://github.com/firepress-org/ghostfire

Live Demo

Want to try Ghost quickly? This is for you!

play-with-ghost.com is a playground to learn about Ghost. What's remarkable here, is that you have the option to log in into the admin panel of each live demo available, by using dummy credentials.

In short, you can try Ghost on the spot without having to sign-up!


pwg-video-preview-e


Explainer video

pwg-video-preview-b

Why forking the official Docker image?

We tweaked a few elements like:

  • Ghost container is running under tini
  • Easier to read Dockerfile with a cleaner envvar display
  • Uninstall the ghost cli to save some space in the final docker image
  • Added curl to do healthcheck

In the future, we plan to use a multi-stage build to slim down the image

How to use this image

Requirement: Ensure you have Docker installed on your machine. (MAC OS X)

To run Ghost in a Docker container, here is the setup we use in production. Just execute runup.sh bash script and you are good to go.

Option #1 (prefered):

  • Run the script by typing: ./runup.sh

Option #2:

GHOSTFIRE_IMG="devmtl/ghostfire:stable"

docker run -d \
—name ghostblog \
-p 2368:2368 \
-e url=http://localhost:2368 -e NODE_ENV=production \
${GHOSTFIRE_IMG}

Option #3 (Stateful)

⚠️ warning — change the path /myuser/localpath/ghost/content and use the latest stable docker image.

GHOSTFIRE_IMG="devmtl/ghostfire:stable"

docker run -d \
—name ghostblog \
-p 2368:2368 \
-e url=http://localhost:2368 -e NODE_ENV=production \
-v /myuser/localpath/ghost/content:/var/lib/ghost/content \
${GHOSTFIRE_IMG}

master branch (stable) tags 🐳

I recommend using the tag from this format: $IMAGE_SHA_SHORT

devmtl/ghostfire:2.9.1-99814a4
devmtl/ghostfire:2.9.1
devmtl/ghostfire:stable

edge branch (not stable) tags 🐳

devmtl/ghostfire:edge-2.9.1-7d64db0
devmtl/ghostfire:edge-2.9.1
devmtl/ghostfire:edge

Latest docker images 🐳

Edge VS Master

⚠️ Workflow warning. You would expect that we merge edge into master. We don’t do this. Think of it as two independent projects. The main reason for this is the fact that the two .travis.yml files don’t push the same docker images (stable VS edge).

Let’s understand our process.

Because we run a lot of websites in production using this image, we prefer to do UAT (tests) using a dedicated edge branch. Few sites (a cohort of all site we manage) deploy automatically every update on edge. It’s a manual checkpoint that helps us avoiding crashing websites at scale. It also has the advantage to keep a clean commit history (without doing git-fu all the time).

Once we confirm the edge build is a PASS, we update the Dockerfile in master branch as well. At this point, we are entirely confident the docker image is working correctly and deploy every site we manage.

Developing Ghost themes locally

I open sourced my setup here. It’s a workflow to run Ghost locally within a Docker container. Once your local paths are defined, it’s enjoyable and easy to work between many themes.

Random

Breaking change

  • Ghost 2.x.x is: /var/lib/ghost/content
  • Ghost 1.x.x is: /var/lib/ghost/content
  • Ghost 0.11.x is: /var/lib/ghost

If you still run Ghost 0.11.xx, be aware of the container's path difference.

SQLite Database

This Docker image for Ghost uses SQLite. There is nothing special to configure.

What is the Node.js version?

docker exec <container-id> node --version

You can also see this information in the Dockerfile and in the Travis builds.

Services

Hosting

At FirePress we do one thing and we do it with our whole heart: we host fully managed Ghost’s websites. The idea behind FirePress is to empower freelancers and small organizations to be able to build an outstanding mobile-first website.

Because we believe your website should speak up in your name, we consider our mission completed once your site has become your impresario. Start your free trial here.

Workshop

We also offer a workshop where participants end up with a website/blog they can smoothly operate themselves. Details are coming soon. The workshops will be available in those cities:

  • Montréal - Canada
  • Toronto - Canada
  • Québec City - Canada
  • New-York - USA

Contributing

The power of communities pull request and forks means that 1 + 1 = 3. Help me make this repo a better one!

  1. Fork it
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request

Need help? Check this post: Contributing to our Github project. Also, by contributing you agree to the Contributor Code of Conduct on GitHub.

Copyright

  • This git repo is under the GNU V3 license. Find it here.
  • The Ghost’s software is under the MIT license. Find it here.

Sources & Fork

Keep in touch

P.S. As you might see, I’m not a native English speaker. If something sounds funny, please let me know. Just open an issue. Thank you!

Cheers!