1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-12-23 01:39:27 +02:00
dockerfiles/ghost
2016-11-04 23:55:18 +08:00
..
arm upgrage ghost-arm to 0.11.3 2016-11-04 23:55:18 +08:00
docker-compose.yml update ghost 2016-05-05 20:49:15 +08:00
README.md update ghost 2016-06-06 18:27:08 +08:00

ghost

Ghost is a free and open source blogging platform written in JavaScript.

docker-compose.yml

ghost:
  image: ghost
  ports:
    - "127.0.0.1:2368:2368"
  restart: always

Up and Running

$ docker-compose up -d
$ docker-compose exec ghost bash
>>> cd /var/lib/ghost/
>>> sed -i 's@http://localhost:2368@https://blog.easypi.info@' config.js
>>> grep -rIl 'googleapis' core content | xargs sed -i 's/googleapis/useso/g'
>>> exit
$ docker-compose restart

⚠️ useso.com doesn't support https!

Setup SSL

Read this to setup SSL.

server {
    listen 80 default;
    server_name _;
    location / {
        return 301 https://$host$request_uri;
    }
}

server {
    listen 443 ssl;
    server_name easypi.info blog.easypi.info;
    ssl_certificate ssl/easypi.info.crt;
    ssl_certificate_key ssl/easypi.info.key;
    location / {
        if ($host = 'easypi.info') {
            return 301 $scheme://blog.$host$request_uri;
        }
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host $http_host;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_pass http://127.0.0.1:2368;
    }
}

Ghost Setup

Ghost allows you to inject code into the top and bottom of your theme files without editing them.

<style>
  pre code, pre tt {
    white-space: pre !important;
  }
</style>