1
2
mirror of https://github.com/vimagick/dockerfiles synced 2024-06-29 18:21:24 +00:00
dockerfiles/ghost/README.md

60 lines
1.2 KiB
Markdown
Raw Normal View History

2015-08-30 23:53:16 +00:00
ghost
=====
2016-05-05 12:11:54 +00:00
[Ghost][1] is a free and open source blogging platform written in JavaScript.
2015-08-30 23:53:16 +00:00
## docker-compose.yml
2016-05-05 12:11:54 +00:00
```yaml
2015-08-30 23:53:16 +00:00
ghost:
2016-05-05 12:11:54 +00:00
image: ghost
ports:
- "127.0.0.1:2368:2368"
restart: always
2015-08-30 23:53:16 +00:00
```
## Up and Running
2016-05-05 12:11:54 +00:00
```bash
2015-08-30 23:53:16 +00:00
$ docker-compose up -d
2016-05-05 12:11:54 +00:00
$ docker-compose exec ghost bash
2015-08-30 23:53:16 +00:00
>>> cd /var/lib/ghost/
2016-05-05 12:11:54 +00:00
>>> sed -i 's@http://localhost:2368@https://blog.easypi.info@' config.js
2015-08-30 23:53:16 +00:00
>>> sed -i '/google/d' themes/casper/default.hbs
>>> exit
$ docker-compose restart
```
2016-05-05 12:11:54 +00:00
## Setup SSL
> Read [this][2] 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;
}
}
```
[1]: https://ghost.org/
[2]: http://support.ghost.org/setup-ssl-self-hosted-ghost/