Skip to content

btobolaski/docker-ghost

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker Ghost

This creates a Docker container that you can run a Ghost blog in, if it is using SQLite. I run ruin.io using it. It mounts the code/content from the host machine so you don't need to worry about accessing your data inside the container. It also features Varnish . In my testing, Ghost could only server ~40req/s, so Varnish will keep your site up if you happen to experience more requests than Ghost can handle.

To use it, you will need to mount the directory that your site resides in. On my server, my Ghost blog is at /var/node/ruin, so the startup command looks like:

	docker run -d -v /var/node/ruin:/ghost -m 1024m -p 127.0.0.1:2368:8080 --name=ghost btobolaski/ghost:latest

If you would like ghost to live on a different port, just change the 2368 in the command.

After that, I would recommend setting up nginx on your Docker host and setting up a reverse proxy. This is what my config looks like:

server {
    listen 80;
    server_name ruin.io www.ruin.io;

    location / {
        proxy_set_header   X-Real-IP $remote_addr;
        proxy_set_header   Host      $http_host;
        proxy_pass         http://127.0.0.1:2368;
        client_max_body_size       10m;
	      client_body_buffer_size    128k;
    }
}

To use this, you can either clone this repo and build it yourself, docker build -t <your name>/ghost . or it is available from the Docker index as btobolaski/ghost.

About

A Docker container for running ghost.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages