forked from thedigitalgarage/dg-ghost-container
-
Notifications
You must be signed in to change notification settings - Fork 0
/
params.json
6 lines (6 loc) · 5.46 KB
/
params.json
1
2
3
4
5
6
{
"name": "Dg-ghost",
"tagline": "A Digital Garage Docker image for the Ghost blogging platform.",
"body": "# dg-ghost\r\nA Digital Garage Docker image for the [Ghost](https://github.com/TryGhost/Ghost) blogging platform.\r\nThis image is designed specifically to support the deployment of Ghost via Docker and Kubernetes via the Digital Garage. This image is a bit more configurable than the [official Ghost Docker image](https://registry.hub.docker.com/_/ghost/).\r\n\r\n# What is Ghost?\r\nGhost is a free and open source blogging platform written in JavaScript and distributed under the MIT License, designed to simplify the process of online publishing for individual bloggers as well as online publications.\r\n\r\nThe concept of the Ghost platform was first floated publicly in November 2012 in a blog post by project founder John O'Nolan, which generated enough response to justify coding a prototype version with collaborator Hannah Wolfe.\r\n\r\nThe first public version of Ghost, released October 2013, was financed by a successful Kickstarter campaign which achieved its initial funding goal of £25,000 in 11 hours and went on to raise a final total of £196,362 during the 29-day campaign.\r\n\r\n```\r\nwikipedia.org/wiki/Ghost_(blogging_platform)\r\n```\r\n\r\n\r\n![ghost]\r\n\r\n[ghost]: https://ghost.org/assets/logos-f93942864f8c9f4a0a9b0ecd6f7f055c.png\r\n\r\n## Why yet another container for Ghost?\r\n\r\nThe official container for Ghost is fine for running in development mode, but it has the wrong\r\npermissions for running in production. That, and the config file doesn't have any easy way to tweak\r\nit.\r\n\r\nThis container uses the official Ghost image as it's base, has a more \"environment aware\"\r\n`config.js` file, and uses these environment variables to tune the config.\r\n\r\n## Quickstart on via Docker\r\n\r\n```\r\ndocker run --name some-ghost -d thedigitalgarage/dg-ghost\r\n```\r\n\r\nThis will start Ghost in development mode listening on the default port of 2368.\r\n\r\nIf you'd like to be able to access the instance from the host without the\r\ncontain's IP, standard port mappings can be used:\r\n\r\n```\r\ndocker run --name some-ghost -p 8080:2368 -d thedigitalgarage/dg-ghost\r\n```\r\n\r\nThen, access it via `http://localhost:8080` or `http://host-ip:8080` in a browser.\r\n\r\n## Configuration\r\n\r\nThere are three environment variables that can be configured:\r\n\r\n* `GHOST_URL`: the URL of your blog (e.g., `http://www.example.com`)\r\n* `MAIL_FROM`: the email of the blog installation (e.g., `'\"Webmaster\" <[email protected]>'`)\r\n* `MAIL_HOST`: which host to send email to (e.g., `mail.example.com`)\r\n\r\nThese can either be set on the Docker command line directly, or stored in a file and passed on\r\nthe Docker command line:\r\n\r\n```\r\nsudo cp ghost.example.env /etc/default/ghost\r\nsudo vi /etc/default/ghost\r\ndocker run --name some-ghost --env-file /etc/default/ghost -p 8080:2368 -d thedigitalgarage/dg-ghost\r\n```\r\n\r\nIf you have just pulled the Docker image with `docker pull thedigitalgarage/dg-ghost`, the example\r\nenvironment file looks like this:\r\n\r\n```\r\n# Ghost environment\r\n# Place in /etc/default/ghost\r\n\r\nGHOST_URL=http://www.example.com\r\nMAIL_FROM='\"Webmaster\" <[email protected]>'\r\nMAIL_HOST=mail.example.com\r\n```\r\n\r\n## Running in production\r\n\r\nThe official Ghost image places the blog content in `/var/lib/ghost` and exports it as a `VOLUME`.\r\nThis allows two main modes of operation:\r\n\r\n### Content on host filesystem\r\n\r\nIn this mode, the Ghost blog content lives on the filesystem of the host with the `UID`:`GID` of\r\n`1000`:`1000`. If this is acceptable, create a directory somewhere, and use the `-v` Docker command\r\nline option to mount it:\r\n\r\n```\r\nsudo mkdir -p /var/lib/ghost\r\nsudo chown 1000:1000 /var/lib/ghost\r\ndocker run --name some-ghost --env-file /etc/default/ghost -p 80:2368 -v /var/lib/ghost:/var/lib/ghost -d ptimof/ghost npm start --production\r\n```\r\n\r\n### Content in a data volume\r\n\r\nThis is the preferred mechanism to store the blog data. Please see the\r\n[Docker documentation](https://docs.docker.com/userguide/dockervolumes/#backup-restore-or-migrate-data-volumes)\r\nfor backup, restore, and migration strategies.\r\n\r\n```\r\ndocker create -v /var/lib/ghost --name some-ghost-content busybox\r\ndocker run --name some-ghost --env-file /etc/default/ghost -p 80:2368 --volumes-from some-ghost-content -d ptimof/ghost npm start --production\r\n```\r\n\r\nYou should now be able to access this instance as `http://www.example.com` in a browser.\r\n\r\n### Behind a reverse proxy\r\n\r\nOf course, you should really be running Ghost behind a reverse proxy, and set things up to auto restart. For that,\r\na reasonable container would be:\r\n\r\n```\r\ndocker create --name some-ghost -h ghost.example.com --env-file /etc/default/ghost -p 127.0.0.1:2368:2368 --volumes-from some-ghost-content --restart=on-failure:10 ptimof/ghost npm start --production\r\ndocker run some-ghost\r\n```\r\n## Further reading\r\n\r\nIf you would like to read more about deploying and runnning this image on Digital Garage, you can find the tutorial on the Digital Garage Community site here:\r\n\r\n* [Deploy Ghost with the Digital Garage Instant App](http://www.thedigitalgarage.io/community/ghost-deployment/): a tutorial on deploying the Ghost Blogging Platform via Docker and Kubernetes on the Digital Garage.",
"note": "Don't delete this file! It's used internally to help with page regeneration."
}