Sign inSign up

luciddan/ghost

By luciddan

•Updated over 7 years ago

My version of the Ghost docker image

Image
0

217

luciddan/ghost repository overview

⁠docker-ghost

Build Status Coverage Status Gitter

Want to find out more about Ghost, the professional open-source publishing platform?⁠

This repository builds a Docker container image for the Ghost publishing platform, designed to be used on a variety of cloud platforms and environments, with as many storage and scheduling options as we can reasonably manage and maintain.

⁠More details

First of all, if you're interested in trying Ghost, and you are at all unsure about how to get going, or you have no experience building custom solutions on platforms like AWS, Kubernetes, and Google Cloud: this project is not for you.

Seriously, if you're just looking for a cheap way to deploy a publishing platform, I strongly encourage you to pay the money and get a Ghost(Pro) subsrciption⁠ - the hosted service is run by the Ghost Foundation, and all the money they make goes straight back into the foundation to pay for the infrastructure and the salaries of the core developers that make Ghost amazing.

That having been said, if you have a need or desire to run your own self-hosted Ghost server, this project is a great way to get that going.

The docker images built by this project are designed to run in a variety of cloud environments, at a minimum including:

  • Heroku
  • Google Cloud (GKE or GCE)
  • AWS (EC2, EKS)
  • Digital Ocean (Docker or Kubernetes)
  • and probably many more; in theory, any Kubernetes based platform should work.

Database support and documentation is included for:

  • Amazon RDS
  • Google Cloud SQL
  • Heroku JAWSDB

Mail integration support and documentation is included for:

  • Mailgun

Adapters for storage and scheduling are included for:

  • Amazon S3 (storage)
  • Google Cloud Storage (storage)

Support for custom scheduling (e.g. Heroku scheduler) is currently in the works.

Looking into Digital Ocean block storage as well.

⁠Getting Started

You can deploy the Docker image directly from hub.docker.org.

Setup of a Ghost server can be quite involved; be sure to check the documentation for more guidance.

⁠Environment Variables

Here is a quick summary of the environment variables to pass through to the container. Note that this does not include the low level Ghost environment variables, which are typically lower case (for example 'database__connection__filename').

Variable NameGhost Config Node (if any)Description
PORTserver.portDefines the port to expose. Automatically defined by Heroku. GHOST_PORT overrides this
MAILGUN_SMTP_LOGINmail.options.auth.userMailgun user. Automatically defined by Heroku's Mailgun app.
MAILGUN_SMTP_PASSWORDmail.options.auth.passMailgun password. Automatically defined by Heroku's Mailgun app.
JAWSDB_URLdatabase.connection.*Connection URL for database. Automatically defined by Heroku's JAWSDB app.
MYSQL_DATABASE_URLdatabase.connection.*Alternative connection URL for database.
CLEARDB_DATABASE_URLdatabase.connection.*Alternative connection URL for database.
GHOST_PORTserver.portThe port to listen for connections on.
GHOST_ADMIN_URLadmin.urlThe hostname and path of the admin site.
GHOST_PUBLIC_URLurlThe public URL used to access the blog site.
GHOST_MYSQL_DATABASEdatabase.connection.databaseThe name of the database to be used, if no URL specified.
GHOST_MYSQL_HOSTdatabase.connection.hostThe hostname of the database to be used, if no URL specified.
GHOST_MYSQL_PORTdatabase.connection.portThe TCP port of the database to be used, if no URL specified.
GHOST_MYSQL_USERdatabase.connection.userThe username of the database to be used, if no URL specified.
GHOST_MYSQL_PASSWORDdatabase.connection.passwordThe password of the database to be used, if no URL specified.
GHOST_MYSQL_CAdatabase.connection.ssl.caThe contents of the CA for the server. If set to 'Amazon RDS', ignore the cert and key fields and use the special RDS profile.
GHOST_MYSQL_CERTdatabase.connection.ssl.certThe contents of the public SSL certificate for this client.
GHOST_MYSQL_KEYdatabase.connection.ssl.keyThe contents of the private SSL key for this client.
GHOST_MAIL_FROMmail.fromThe email 'From' address, in format '"Some Name" [email protected]⁠'
GHOST_MAIL_USERmail.options.auth.userThe username of the SMTP account to email from
GHOST_MAIL_PASSWORDmail.options.auth.passThe password of the SMTP account to email from
GHOST_LOG_LEVELlogging.levelThe logging level. Defaults to info, can be set to error or debug for less or more logging respectively.
GHOST_STORAGE_ADAPTERstorage.activeThe active storage adapter
GHOST_STORAGE_GCLOUD_KEYstorage.gcloud.keyThe contents of the Google service account credential JSON file.
GHOST_STORAGE_GCLOUD_PROJECT_IDstorage.gcloud.projectIdThe Project ID in Google Storage for this bucket.
GHOST_STORAGE_GCLOUD_BUCKETstorage.gcloud.bucketThe name of the Google Storage bucket. May often be the domain name of the site.
GHOST_STORAGE_GCLOUD_MAX_AGEstorage.gcloud.maxAgeThe maximum age of objects in Storage before they need to be replaced.
GHOST_STORAGE_GCLOUD_ASSET_DOMAINstorage.gcloud.assetDomainThe asset domain to access the storage bucket.
GHOST_STORAGE_S3_ACCESS_KEY_IDstorage.s3.accessKeyIdThe AWS S3 access key.
GHOST_STORAGE_S3_SECRET_ACCESS_KEYstorage.s3.secretAccessKeyThe AWS S3 secret access key.
GHOST_STORAGE_S3_BUCKETstorage.s3.bucketThe name of the S3 bucket to use for static files.
GHOST_STORAGE_S3_REGIONstorage.s3.regionThe name of the AWS region where the S3 bucket is hosted.
GHOST_STORAGE_S3_ASSET_HOSTstorage.s3.assetHostThe hostname to access assets in this bucket via a public URL.
GHOST_STORAGE_S3_BUCKET_SUBDIRstorage.s3.pathPrefixThe base subdirectory to access the assets in this bucket under.

⁠Continuous Integration

Continuous Integration of the master branch is done via Travis-CI, with Docker images automatically deployed to Docker Hub whenever new code is commited to the master branch.

⁠Contributing

Please read CONTRIBUTING.md⁠ for details on our code of conduct and the processes for contributing to the project.

⁠Versioning

We use SemVer⁠ for versioning. For the versions available, see the tags on this repository⁠.

⁠Authors

See also the list of contributors⁠ who have participated in this project.

⁠License

This project is licensed under the ISC License - see the LICENSE⁠ file for details

⁠Acknowledgments

  • Ghost is amazing, and the Ghost Foundation is fantastic in the relatively unique model of non-profit open source development they've set up.

Tag summary

Content type

Image

Digest

Size

116.2 MB

Last updated

over 7 years ago

docker pull luciddan/ghost