in Dockers ~ read.
Ghost adventures

Ghost adventures

Preface: I forgot to take notes while doing this... So i've probably missed a couple of steps.

Getting this blog to run.

Nginx

I've already set up ssl termination only added the proxy
Proxy section in nginx:

location / {  
        proxy_pass http://murf:2368;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto https;
        proxy_set_header Host $http_host;
        proxy_set_header X-NginX-Proxy true;
        proxy_intercept_errors on;
    }

Config settings in config.js for ghost:

I encountered a strange 500 error in the admin panel. It turns out that proxying and setting the url to https in ghost config.js will/can cause a redirect loop. It was fixed by setting the header to https

proxy_set_header X-Forwarded-Proto https;  

and not $scheme as the ghost manual says.

Ghost

I pulled the latest ghost docker image. Changing the backend to mysql Following the allaboutghost.com blog post

Setting it up to run in production mode. Im running all my containers via the tutum service. So it was as simple as adding an environment variable

NODE_ENV=production  

And adding the path in the config.js

paths: {  
    contentPath: path.join(process.env.GHOST_CONTENT, '/')
}
comments powered by Disqus