mirror of
https://github.com/vimagick/dockerfiles.git
synced 2025-04-19 12:02:19 +02:00
update ghost
This commit is contained in:
parent
ff54633d7f
commit
2a4db68b68
@ -12,21 +12,20 @@ ghost:
|
|||||||
- "127.0.0.1:2368:2368"
|
- "127.0.0.1:2368:2368"
|
||||||
volumes:
|
volumes:
|
||||||
- ./data:/var/lib/ghost/content
|
- ./data:/var/lib/ghost/content
|
||||||
|
- ./data/config.json:/var/lib/ghost/config.production.json
|
||||||
restart: always
|
restart: always
|
||||||
```
|
```
|
||||||
|
|
||||||
## Up and Running
|
## Up and Running
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker-compose up -d
|
$ mkdir data
|
||||||
$ cd data
|
$ cd data
|
||||||
$ sed -i 's@http://localhost:2368@https://blog.easypi.info@' config.js
|
$ wget https://github.com/vimagick/dockerfiles/raw/master/ghost/data/config.json
|
||||||
$ grep -rIl 'googleapis' core content | xargs sed -i 's/googleapis/useso/g'
|
$ sed -i 's@http://localhost:2368@https://blog.easypi.pro@' config.js
|
||||||
$ docker-compose restart
|
$ docker-compose up -d
|
||||||
```
|
```
|
||||||
|
|
||||||
> :warning: `useso.com` doesn't support https!
|
|
||||||
|
|
||||||
## Setup SSL
|
## Setup SSL
|
||||||
|
|
||||||
> Read [this][2] to setup SSL.
|
> Read [this][2] to setup SSL.
|
||||||
@ -42,11 +41,11 @@ server {
|
|||||||
|
|
||||||
server {
|
server {
|
||||||
listen 443 ssl;
|
listen 443 ssl;
|
||||||
server_name easypi.info blog.easypi.info;
|
server_name easypi.pro blog.easypi.pro;
|
||||||
ssl_certificate ssl/easypi.info.crt;
|
ssl_certificate ssl/easypi.pro.crt;
|
||||||
ssl_certificate_key ssl/easypi.info.key;
|
ssl_certificate_key ssl/easypi.pro.key;
|
||||||
location / {
|
location / {
|
||||||
if ($host = 'easypi.info') {
|
if ($host = 'easypi.pro') {
|
||||||
return 301 $scheme://blog.$host$request_uri;
|
return 301 $scheme://blog.$host$request_uri;
|
||||||
}
|
}
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
@ -72,4 +71,4 @@ files without editing them.
|
|||||||
|
|
||||||
[1]: https://ghost.org/
|
[1]: https://ghost.org/
|
||||||
[2]: http://support.ghost.org/setup-ssl-self-hosted-ghost/
|
[2]: http://support.ghost.org/setup-ssl-self-hosted-ghost/
|
||||||
[3]: https://blog.easypi.info/ghost/settings/code-injection/
|
[3]: https://blog.easypi.pro/ghost/settings/code-injection/
|
||||||
|
@ -4,4 +4,5 @@ ghost:
|
|||||||
- "127.0.0.1:2368:2368"
|
- "127.0.0.1:2368:2368"
|
||||||
volumes:
|
volumes:
|
||||||
- ./data:/var/lib/ghost/content
|
- ./data:/var/lib/ghost/content
|
||||||
|
- ./data/config.json:/var/lib/ghost/config.production.json
|
||||||
restart: always
|
restart: always
|
||||||
|
26
ghost/data/config.json
Normal file
26
ghost/data/config.json
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
"url": "http://localhost:2368/",
|
||||||
|
"server": {
|
||||||
|
"port": 2368,
|
||||||
|
"host": "0.0.0.0"
|
||||||
|
},
|
||||||
|
"database": {
|
||||||
|
"client": "sqlite3",
|
||||||
|
"connection": {
|
||||||
|
"filename": "/var/lib/ghost/content/data/ghost.db"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"mail": {
|
||||||
|
"transport": "Direct"
|
||||||
|
},
|
||||||
|
"logging": {
|
||||||
|
"transports": [
|
||||||
|
"file",
|
||||||
|
"stdout"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"process": "systemd",
|
||||||
|
"paths": {
|
||||||
|
"contentPath": "/var/lib/ghost/content"
|
||||||
|
}
|
||||||
|
}
|
@ -4,4 +4,5 @@ ghost:
|
|||||||
- "127.0.0.1:2368:2368"
|
- "127.0.0.1:2368:2368"
|
||||||
volumes:
|
volumes:
|
||||||
- ./data:/var/lib/ghost/content
|
- ./data:/var/lib/ghost/content
|
||||||
|
- ./data/config.json:/var/lib/ghost/config.production.json
|
||||||
restart: always
|
restart: always
|
||||||
|
Loading…
x
Reference in New Issue
Block a user