mirror of
https://github.com/vimagick/dockerfiles
synced 2024-06-28 09:41:20 +00:00
update ghost
This commit is contained in:
parent
32e803f96a
commit
1dadb791a2
@ -1,24 +1,59 @@
|
|||||||
ghost
|
ghost
|
||||||
=====
|
=====
|
||||||
|
|
||||||
|
[Ghost][1] is a free and open source blogging platform written in JavaScript.
|
||||||
|
|
||||||
## docker-compose.yml
|
## docker-compose.yml
|
||||||
|
|
||||||
```
|
```yaml
|
||||||
ghost:
|
ghost:
|
||||||
image: ghost
|
image: ghost
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:2368:2368"
|
- "127.0.0.1:2368:2368"
|
||||||
restart: always
|
restart: always
|
||||||
```
|
```
|
||||||
|
|
||||||
## Up and Running
|
## Up and Running
|
||||||
|
|
||||||
```
|
```bash
|
||||||
$ docker-compose up -d
|
$ docker-compose up -d
|
||||||
$ docker exec -it ghost_ghost_1 bash
|
$ docker-compose exec ghost bash
|
||||||
>>> cd /var/lib/ghost/
|
>>> cd /var/lib/ghost/
|
||||||
>>> sed -i 's/localhost:2368/blog.easypi.info/' config.js
|
>>> sed -i 's@http://localhost:2368@https://blog.easypi.info@' config.js
|
||||||
>>> sed -i '/google/d' themes/casper/default.hbs
|
>>> sed -i '/google/d' themes/casper/default.hbs
|
||||||
>>> exit
|
>>> exit
|
||||||
$ docker-compose restart
|
$ docker-compose restart
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## 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/
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
ghost:
|
ghost:
|
||||||
image: ghost
|
image: ghost
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:2368:2368"
|
- "127.0.0.1:2368:2368"
|
||||||
restart: always
|
restart: always
|
||||||
|
Loading…
Reference in New Issue
Block a user