All Projects → robincher → docker-compose-ghost-quickstart

robincher / docker-compose-ghost-quickstart

Licence: MIT license
👻 Ghost blogging platform quick start with docker compose

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to docker-compose-ghost-quickstart

undefined-ghost-theme
A minimal, Ghost 5.0-ready, membership-enabled starter theme for the Ghost blogging platform.
Stars: ✭ 76 (+55.1%)
Mutual labels:  ghost-blog
kubernetes-front-end-backend-example
Demonstration on how to setup ingress, two services ( frontend and backend) with reverse proxy
Stars: ✭ 24 (-51.02%)
Mutual labels:  nginx-proxy
docker-nginx-proxy-cloudflare-companion
Automatically update CNAME records when Docker container starts via Cloudflare
Stars: ✭ 26 (-46.94%)
Mutual labels:  nginx-proxy
s3cr3t
A supercharged S3 reverse proxy
Stars: ✭ 55 (+12.24%)
Mutual labels:  nginx-proxy
nginx-proxy-manager
Docker container for managing Nginx proxy hosts with a simple, powerful interface
Stars: ✭ 9,268 (+18814.29%)
Mutual labels:  nginx-proxy
aesto
Free Ghost theme with membership support. Minimal content focused design with multi author supported.
Stars: ✭ 31 (-36.73%)
Mutual labels:  ghost-blog
docker-eth-dev
Hacking together a containerized environment for Ethereum development with Truffle using Parity
Stars: ✭ 22 (-55.1%)
Mutual labels:  nginx-proxy
django-boilerplate-3.6.1
Django served by Gunicorn running behind Nginx reverse proxy. Deploy to AWS Elastic Beanstalk with Fabric3!
Stars: ✭ 13 (-73.47%)
Mutual labels:  nginx-proxy
donnie-dark
Donnie Dark is dark, responsive, customizable theme for Ghost 0.5+ blogs. Name of the theme is hats-off for a great movie.
Stars: ✭ 20 (-59.18%)
Mutual labels:  ghost-blog
starter
A clean theme for Ghost blog
Stars: ✭ 26 (-46.94%)
Mutual labels:  ghost-blog
ghost-theme
a ghost theme
Stars: ✭ 19 (-61.22%)
Mutual labels:  ghost-blog
oauth2 proxy
Dockerization of bitly's oauth2_proxy
Stars: ✭ 58 (+18.37%)
Mutual labels:  nginx-proxy
geostat
GeoStat, Python script for parsing Nginx and Apache logs files and getting GEO data from incoming IP's.
Stars: ✭ 50 (+2.04%)
Mutual labels:  nginx-proxy
nginx-reverseproxy
A simple implementation of a multidomain nginx reverse proxy, using Node apps.
Stars: ✭ 46 (-6.12%)
Mutual labels:  nginx-proxy
django-template
The ultimate Django template: production ready Django 3.2 with Docker, HTTPS and CI/CD using Github actions ‎️‍🔥
Stars: ✭ 20 (-59.18%)
Mutual labels:  nginx-proxy
docker-letsencrypt-django-nginx-proxy-uwsgi-postgres
Docker + Letsencrypt + Django + Nginx-Proxy + uWSGI 教學
Stars: ✭ 26 (-46.94%)
Mutual labels:  nginx-proxy
Prometheus
🌈 A Clean And Modern Ghost Theme with Progressive Web Apps (PWA)
Stars: ✭ 94 (+91.84%)
Mutual labels:  ghost-blog
docker-ghost
Docker File for Golden Ghost image
Stars: ✭ 16 (-67.35%)
Mutual labels:  ghost-blog
vue-production-server-proxy
Boilerplate for Vue project ready for production, with neat implementation of "devServer proxy" in production environment, using Nginx
Stars: ✭ 27 (-44.9%)
Mutual labels:  nginx-proxy
ghost-vue
Frontend for Ghost built with Vue.js and Bulma
Stars: ✭ 25 (-48.98%)
Mutual labels:  ghost-blog

Docker Compose Quickstart for Ghost Blogging Platform

PRs Welcome MIT License

Quick start docker compose that include Ghost blog, Nginx proxy with TLS/SSL and MySQL database. The intention is to get a general feel of depolying Ghost in production mode, where each component (Web , App & DB) are deployed seperately. This supports scaling and isolate failure (if any).

The compose file will pull the latest tag of each respecitve docker images before running them. Additionally, it will also persist data generated by the containters using Docker's volume.

If you want to test out Ghost locally and just to explore its feature, you should consider installing ghost-cli instead.

npm install -g ghost-cli@latest # Install Ghost 
ghost install local # Running on Dev

Table of Contents

Overview

ghost.png

Operating ENV

  • Operating System Redhat Enterprise Linux 5.7

  • docker version 1.12.2

  • docker-compose version 1.9.0

Technology Stack

  • Node.js
    • Ghost blog software version 1.x
  • NGINX
    • proxying port 80 calls to the Node web server on port 2368
  • MySQL database
    • using UTFMB4 encoding (MySQL's UTF8 implementation was limited. UTFMB4 includes Emoji)

Preparation

  • A server sitting somewhere, like Amazon EC2 , Google Compute Cloud or a virutal machine connected to your own network
  • Register a domain name (either public or within your own network).
  • A pair of SSL certificate and key for your domain.
  • Access to your domain's DNS.

How to Use It

  1. Clone this project into the server's filesystem.
  2. Edit settings in config.<>.json and docker-compose.yml as required
    • config.production.json and update the fields as required
    • Database Initial set-up settings - under ghost and mysql services in docker-compose file, indicate the env variables
  3. Add your TLS/SSL certificate and key to ./nginx/ssl
  4. Set your registered domain (server_name) in ./nginx/conf/ghost.conf (must match the common name in your TLS/SSL certificate)
  5. Run docke-compose within your Linux environment 0. docker-compose build 0. docker-compose up -d (you can remove the -d if you want to see logs, then Ctrl+C to stop all containers)
  6. Go to https://YOUR_DOMAIN/admin to set up your blog.
  7. Once you've made your admin account using that wizard, go back to: https://YOUR_DOMAIN/admin
  8. Log in and enjoy.
  9. Stopping and remove all containers : docker-compose down --remove-orphans

How to back up your database

  1. Run "docker-compose ps" to get a list of running containers.
  2. Locate the name of the mysql container.
  3. Run this command to get the container's internal IP: docker inspect --format='{{.NetworkSettings.IPAddress}}' THAT_CONTAINER-NAME
  4. In your favorite database GUI tool (like Navicat or DataGrip), create a new connection via SSH tunnel to the host machine
  5. Use the internal IP address and database user and password to connect to database once SSH tunnel is established to host.
  6. You'll have access to the data so you can view data and run backups.

Install Theme

Stop docker-compose with: docker-compose stop

Copy the new theme to ./ghost/content/theme so that your theme folder sits next to the casper folder in the themes directory

Now run: docker-compose up -d

Log in to the Ghost admin, go to Settings > General, and at the bottom is the Theme dropdown. Select your theme and click Save.

How does that work?

The ./ghost/content directory (on docker host machine) gets mounted inside your ghost container folder /var/lib/ghost when the container starts running. See docker-compose.yml for more details

Security and Networking

  • Only NGINX's ports (443) are exposed at host level.
  • Support only TLS version 1.2 for incoming traffic
  • HTTP/2 Enabled for Nginx Reverse Proxy

License

MIT LICENSE

References

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].