Skip to content

We use this docker image to host Ghost websites at FirePress 🔥📰. See live demos at play-with-ghost.com

License

Notifications You must be signed in to change notification settings

firepress-org/ghostfire

 
 

Repository files navigation

 

FirePress

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

 


What is this?

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. This projects makes it running in Docker image.


Docker image features :

  • multi-stage builds
  • curl to support healthchecks
  • config.production.json template
  • Docker image based on alpine (we don't maintain debian)
  • Labels based on the opencontainer standard

We are trimming about 45MB. These are uncompressed sizes :

devmtl/ghostfire:stable                340MB
ghost:4.16.0-alpine                    384MB

Github Actions CI/CD :

ci status

  • Support multi architecture platforms: linux/amd64, linux/arm64, linux/arm/v7
  • Great logic between jobs
  • Shared variables between jobs
  • Builds use cache
  • Continuous Deployment in the cluster for edge and stable
  • Slack notifications when a build is successful
  • Lighthouse audit(localhost and online)
  • Security scanners (Snyk, Dockle, Trivy)
  • Linting using super-linter
  • Overall we do our best to apply best practices
  • Extreme visibility during our build in Github Actions (screenshot below)

CI_2021-10-03_17h42


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 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


Continuous integration

See Github Actions sections

At this point, this docker image has been pulled more than 11 millions of time!

docker-hub

Option #1 (basic run)

GHOSTFIRE_IMG="devmtl/ghostfire:stable"

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

Option #2 (with configs and stateful data)

GHOSTFIRE_IMG="devmtl/ghostfire:stable"

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

To configure the config.production.json refer the ghost docs.

master branch (stable) tags 🐳

For the stable branch, I recommend using the tag from the first line:

devmtl/ghostfire:stable_4.6.4_fc5b3b6_2021-05-28_11H26s02
devmtl/ghostfire:stable_4.6.4
devmtl/ghostfire:stable

Find the latest tags on DockerHub here: https://hub.docker.com/r/devmtl/ghostfire/tags/

edge branch (dev) tags 🐳

This is reserved for development and testing.

devmtl/ghostfire:edge_4.7.0_bd6bac4_2021-06-17_18H43s47
devmtl/ghostfire:edge_4.7.0
devmtl/ghostfire:edge

DevOps best practices

Let's understand our processes. In this post « How we update hundreds of Ghost's websites on Docker Swarm? », we explain how we deploy Ghost in production and which best practices we do follow.

Enhanced unit tests during the CI

unit-test-a
unit-test-b
unit-test-c


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 stuff

Breaking change. If you still run Ghost 0.11.xx (not recommended!), be aware of the container's path difference.

- Ghost 4.x.x is:  /var/lib/ghost/content
- Ghost 3.x.x is:  /var/lib/ghost/content
- 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

SQLite Database

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

What is the Node.js version?

We follow the latest Node supported version. See this in the Dockerfile.

docker exec <container-id> node --version

You can also see this information in the CI logs.


FirePress Hosting

At FirePress we empower entrepreneurs and small organizations to create their websites on top of Ghost.

At the moment, our pricing for hosting one Ghost website is $15 (Canadian dollars). This price will be only available for our first 100 new clients, starting May 1st, 2019 🙌. See our pricing section for details.

More details about this announcement on Ghost's forum.


Contributing

The power of communities pull request and forks means that 1 + 1 = 3. You can help to make this repo a better one! Here is how:

  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

Check this post for more details: Contributing to our Github project. Also, by contributing you agree to the Contributor Code of Conduct on GitHub. It's plain common sense really.


License

  • 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


Why all this work?

Our mission is to empower freelancers and small organizations 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.

For more info about the man behind the startup, check out my now page. You can also follow me on Twitter @askpascalandy.

— The FirePress Team 🔥📰

About

We use this docker image to host Ghost websites at FirePress 🔥📰. See live demos at play-with-ghost.com

Topics

Resources

License

Stars

Watchers

Forks

Languages

  • Shell 54.1%
  • Dockerfile 45.9%