GithubHelp home page GithubHelp logo

mackox112 / ghostfire Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pascaldes/ghostfire

0.0 0.0 0.0 417 KB

Docker image for Ghost V2 used on FirePress.org and play-with-ghost.com

Home Page: https://play-with-ghost.com

Shell 43.07% Dockerfile 56.93%

ghostfire's Introduction

 

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

Why forking the official Docker image?

  • Using multi-stage builds. The docker image size is 79MB (instead of 210MB)
  • The Docker image use a multi-architecture: AMD64, ARM64, ARM
  • Ghost container is running under tini
  • A better config.production.json template
  • Easier to read Dockerfile with a cleaner ARG display
  • Uninstalled the ghost cli to save some space in the final docker image
  • Added npm cache clean --force to safe some space
  • Added curl to do healthchecks

In the future, we plan to merge our Dockerfile into the official docker Ghost image. Follow the updates here.


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 are using in production. Just execute runup.sh bash script and you are good to go.

Option #1 (Stateful):

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

GHOSTFIRE_IMG="devmtl/ghostfire:2.9.1-99814a4"

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:/var/lib/ghost/config.production.json \
${GHOSTFIRE_IMG}

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

Option #2:

GHOSTFIRE_IMG="devmtl/ghostfire:2.9.1-99814a4"

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

Option #3:

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

Find the latest docker images tag 🐳

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

docker-hub

master branch (stable) tags 🐳

I recommend using the tag from this format: $IMAGE_SHA_SHORT:

devmtl/ghostfire:2.9.1-99814a4

But if you prefer, you can use:

devmtl/ghostfire:2.9.1
devmtl/ghostfire:stable

edge branch (for dev) tags 🐳

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

Master VS Edge

⚠️ Workflow warning. You would expect that we would merge edge into master. We don’t do this. Instead, think of it as independent projects. The main reason is that the .travis.yml is not the same in those two branches.

Let's understand our processes.

DevOps best practices

Because we run a lot of websites in production using this image, we prefer to do UAT (unit acceptance tests) using the edge branch. In other words, it’s a manual checkpoint to avoid a crash at scale. DevOps best practices are essential to us. Many checkpoints ensure this Docker image for Ghost software runs smoothly.

It also has the advantage of keeping a clean commit history in the master branch (without doing git-fu all the time).

In this post, we explain how we deploy Ghost in production and which best practices we do follow.

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, be aware of the container's path difference.

- 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 Dockerfile and in the Travis builds.

FirePress Hosting

I'm glad to say it finally 🙊. We just launched our hosting platform for Ghost out in the wild. 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 annoucement on Ghost's forum.

Workshop

We also offer a workshop where participants end up with a website/blog they can smoothly operate themselves. The workshops are available in:

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

ghostfire's People

Contributors

pascalandy avatar docker-library-bot avatar tianon avatar yosifkit avatar acburdine avatar vegasbrianc avatar soupdiver avatar swatto avatar kdelfour avatar lwis avatar md5 avatar rarkins avatar sasvdw avatar toanhoang avatar stickler-ci avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.