mirror of
https://github.com/vimagick/dockerfiles.git
synced 2025-12-21 13:23:02 +01:00
update ghost
This commit is contained in:
@@ -7,9 +7,11 @@ ghost
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
ghost:
|
ghost:
|
||||||
image: ghost
|
image: ghost:alpine
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:2368:2368"
|
- "127.0.0.1:2368:2368"
|
||||||
|
volumes:
|
||||||
|
- ./data:/var/lib/ghost
|
||||||
restart: always
|
restart: always
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -17,11 +19,9 @@ ghost:
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker-compose up -d
|
$ docker-compose up -d
|
||||||
$ docker-compose exec ghost bash
|
$ cd data
|
||||||
>>> cd /var/lib/ghost/
|
$ sed -i 's@http://localhost:2368@https://blog.easypi.info@' config.js
|
||||||
>>> sed -i 's@http://localhost:2368@https://blog.easypi.info@' config.js
|
$ grep -rIl 'googleapis' core content | xargs sed -i 's/googleapis/useso/g'
|
||||||
>>> grep -rIl 'googleapis' core content | xargs sed -i 's/googleapis/useso/g'
|
|
||||||
>>> exit
|
|
||||||
$ docker-compose restart
|
$ docker-compose restart
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
FROM easypi/alpine-arm
|
FROM easypi/alpine-arm
|
||||||
MAINTAINER EasyPi Software Foundation
|
MAINTAINER EasyPi Software Foundation
|
||||||
|
|
||||||
ENV GHOST_VER 0.11.3
|
ENV GHOST_VER 0.11.8
|
||||||
ENV GHOST_URL https://ghost.org/archives/ghost-$GHOST_VER.zip
|
ENV GHOST_URL https://ghost.org/archives/ghost-$GHOST_VER.zip
|
||||||
ENV GHOST_SOURCE /usr/src/ghost
|
ENV GHOST_SOURCE /usr/src/ghost
|
||||||
ENV GHOST_CONTENT /var/lib/ghost
|
ENV GHOST_CONTENT /var/lib/ghost
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
ghost:
|
ghost:
|
||||||
image: easypi/ghost-arm
|
image: easypi/ghost-arm
|
||||||
ports:
|
ports:
|
||||||
- "2368:2368"
|
- "127.0.0.1:2368:2368"
|
||||||
|
volumes:
|
||||||
|
- ./data:/var/lib/ghost
|
||||||
restart: always
|
restart: always
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
ghost:
|
ghost:
|
||||||
image: ghost
|
image: ghost:alpine
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:2368:2368"
|
- "127.0.0.1:2368:2368"
|
||||||
|
volumes:
|
||||||
|
- ./data:/var/lib/ghost
|
||||||
restart: always
|
restart: always
|
||||||
|
|||||||
@@ -11,38 +11,38 @@ IMAP protocols, as well as a load balancer, HTTP cache, and a web server
|
|||||||
|
|
||||||
File: docker-compose.yml
|
File: docker-compose.yml
|
||||||
|
|
||||||
```
|
```yaml
|
||||||
nginx:
|
nginx:
|
||||||
image: vimagick/nginx
|
image: nginx:alpine
|
||||||
ports:
|
ports:
|
||||||
- "80:80"
|
- "80:80"
|
||||||
volumes:
|
volumes:
|
||||||
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
|
- ./data/default.conf:/etc/nginx/default.conf
|
||||||
- ./html:/usr/share/nginx/html
|
- ./data/html:/usr/share/nginx/html
|
||||||
restart: always
|
restart: always
|
||||||
```
|
```
|
||||||
|
|
||||||
## Website Proxy
|
## Reverse Proxy
|
||||||
|
|
||||||
File: docker-compose.yml
|
File: docker-compose.yml
|
||||||
|
|
||||||
```
|
```yaml
|
||||||
nginx:
|
nginx:
|
||||||
image: nginx:latest
|
image: nginx:alpine
|
||||||
volumes:
|
volumes:
|
||||||
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
|
- ./data/default.conf:/etc/nginx/conf.d/default.conf
|
||||||
- ./nginx/sites-enabled/default:/etc/nginx/sites-enabled/default
|
- ./data/ssl:/etc/nginx/ssl
|
||||||
- ./nginx/htpasswd:/etc/nginx/htpasswd
|
- ./data/htpasswd:/etc/nginx/htpasswd
|
||||||
net: host
|
net: host
|
||||||
restart: always
|
restart: always
|
||||||
```
|
```
|
||||||
|
|
||||||
> Password file can be generated by:
|
> Password file can be generated by:
|
||||||
>> `htpasswd -b -c ./nginx/htpasswd username password`
|
>> `echo "username:$(openssl passwd -apr1 password)" >> data/htpasswd`
|
||||||
|
|
||||||
File: nginx.conf
|
File: nginx.conf
|
||||||
|
|
||||||
```
|
```nginx
|
||||||
user nginx;
|
user nginx;
|
||||||
worker_processes 4;
|
worker_processes 4;
|
||||||
|
|
||||||
@@ -79,7 +79,7 @@ http {
|
|||||||
|
|
||||||
File: default
|
File: default
|
||||||
|
|
||||||
```
|
```nginx
|
||||||
server {
|
server {
|
||||||
listen 80 default;
|
listen 80 default;
|
||||||
server_name _;
|
server_name _;
|
||||||
@@ -118,7 +118,7 @@ server {
|
|||||||
|
|
||||||
File: [rtmp][1]
|
File: [rtmp][1]
|
||||||
|
|
||||||
```
|
```nginx
|
||||||
rtmp {
|
rtmp {
|
||||||
server {
|
server {
|
||||||
listen 1935;
|
listen 1935;
|
||||||
|
|||||||
23
nginx/data/default.conf
Normal file
23
nginx/data/default.conf
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
server {
|
||||||
|
listen 80 default_server;
|
||||||
|
server_name _;
|
||||||
|
return 301 https://$host$request_uri;
|
||||||
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 443 ssl;
|
||||||
|
server_name blog.easypi.info;
|
||||||
|
ssl_certificate ssl/easypi.info/fullchain.pem;
|
||||||
|
ssl_certificate_key ssl/easypi.info/privkey.pem;
|
||||||
|
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
|
||||||
|
ssl_ciphers HIGH:!aNULL:!MD5;
|
||||||
|
location / {
|
||||||
|
proxy_pass http://127.0.0.1:2368;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection "upgrade";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,8 +1,7 @@
|
|||||||
nginx:
|
nginx:
|
||||||
image: vimagick/nginx
|
image: nginx:alpine
|
||||||
ports:
|
|
||||||
- "80:80"
|
|
||||||
volumes:
|
volumes:
|
||||||
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
|
- ./data/default.conf:/etc/nginx/conf.d/default.conf
|
||||||
- ./html:/usr/share/nginx/html
|
- ./data/ssl:/etc/nginx/ssl
|
||||||
|
net: host
|
||||||
restart: always
|
restart: always
|
||||||
|
|||||||
Reference in New Issue
Block a user