Skip to content

Ready to go Ghost blog with Nginx and automatic SSL renewal

License

Notifications You must be signed in to change notification settings

ivanrodjr/ghost-go

 
 

Repository files navigation

Ghost blog using Docker, NGINX and Let's Encrypt

Ghost

With this repo you will be able to use a docker-compose to spin up your Ghost blog in no time!.

  • NGINX proxy to manage your connections.
  • Obtain and automatically renew ssl certificates with Let´s Encrypt.
  • MySql database.
  • Volumes for each container mapped to host.
  • Mailgun support for transactional emails.
  • Configuration centralized in a single file: .env.

Prerequisites

In order to use this compose file (docker-compose.yml) you must have:

  1. docker (https://docs.docker.com/engine/installation/)
  2. docker-compose (https://docs.docker.com/compose/install/)

How to use it

  1. Clone this repository:

  2. Make a copy of the .env.sample and rename it to .env and update this file with your info and preferences.

  3. Run the start script

./start.sh

Your Ghost blog is ready to go!

You don´t need to open port 443 in your container, the certificate validation is managed by the web proxy.

Please note that when running a new container to generate certificates with LetsEncrypt (-e LETSENCRYPT_HOST=your.domain.com), it may take a few minutes depending on multiples circumstances. Also note that the LETSENCRYPT_TEST=${LETSENCRYPT_TEST:-true} is set to true in the in the .env. Change to false when finished debugging and the blog is ready for real traffic. This is to avoid exceeding the certificate rate limit for your domain. More info here.

Additional configurations

  • To add specific NGINX configurations, such as redirects etc... create a .conf file and add it to conf.d directory, while setting the USE_NGINX_CONF_FILES to true in the .env. file.
  • To use Cloudflare, read and uncomment the necessary lines in the /conf.d/realip.conf file.
  • To use Mailgun, set your credentials in the .env file and uncomment the respective lines in the compose file.

Credits

All credit goes to:

About

Ready to go Ghost blog with Nginx and automatic SSL renewal

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 97.2%
  • Dockerfile 2.8%