mirror of
https://github.com/vimagick/dockerfiles.git
synced 2024-12-25 02:04:06 +02:00
update ghost
This commit is contained in:
parent
101ffe5866
commit
6c227b4e02
@ -7,9 +7,11 @@ ghost
|
||||
|
||||
```yaml
|
||||
ghost:
|
||||
image: ghost
|
||||
image: ghost:alpine
|
||||
ports:
|
||||
- "127.0.0.1:2368:2368"
|
||||
volumes:
|
||||
- ./data:/var/lib/ghost
|
||||
restart: always
|
||||
```
|
||||
|
||||
@ -17,11 +19,9 @@ ghost:
|
||||
|
||||
```bash
|
||||
$ 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
|
||||
$ cd data
|
||||
$ sed -i 's@http://localhost:2368@https://blog.easypi.info@' config.js
|
||||
$ grep -rIl 'googleapis' core content | xargs sed -i 's/googleapis/useso/g'
|
||||
$ docker-compose restart
|
||||
```
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
FROM easypi/alpine-arm
|
||||
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_SOURCE /usr/src/ghost
|
||||
ENV GHOST_CONTENT /var/lib/ghost
|
||||
|
@ -1,5 +1,7 @@
|
||||
ghost:
|
||||
image: easypi/ghost-arm
|
||||
ports:
|
||||
- "2368:2368"
|
||||
- "127.0.0.1:2368:2368"
|
||||
volumes:
|
||||
- ./data:/var/lib/ghost
|
||||
restart: always
|
||||
|
@ -1,5 +1,7 @@
|
||||
ghost:
|
||||
image: ghost
|
||||
image: ghost:alpine
|
||||
ports:
|
||||
- "127.0.0.1:2368:2368"
|
||||
volumes:
|
||||
- ./data:/var/lib/ghost
|
||||
restart: always
|
||||
|
@ -11,38 +11,38 @@ IMAP protocols, as well as a load balancer, HTTP cache, and a web server
|
||||
|
||||
File: docker-compose.yml
|
||||
|
||||
```
|
||||
```yaml
|
||||
nginx:
|
||||
image: vimagick/nginx
|
||||
image: nginx:alpine
|
||||
ports:
|
||||
- "80:80"
|
||||
volumes:
|
||||
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
|
||||
- ./html:/usr/share/nginx/html
|
||||
- ./data/default.conf:/etc/nginx/default.conf
|
||||
- ./data/html:/usr/share/nginx/html
|
||||
restart: always
|
||||
```
|
||||
|
||||
## Website Proxy
|
||||
## Reverse Proxy
|
||||
|
||||
File: docker-compose.yml
|
||||
|
||||
```
|
||||
```yaml
|
||||
nginx:
|
||||
image: nginx:latest
|
||||
image: nginx:alpine
|
||||
volumes:
|
||||
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
|
||||
- ./nginx/sites-enabled/default:/etc/nginx/sites-enabled/default
|
||||
- ./nginx/htpasswd:/etc/nginx/htpasswd
|
||||
- ./data/default.conf:/etc/nginx/conf.d/default.conf
|
||||
- ./data/ssl:/etc/nginx/ssl
|
||||
- ./data/htpasswd:/etc/nginx/htpasswd
|
||||
net: host
|
||||
restart: always
|
||||
```
|
||||
|
||||
> Password file can be generated by:
|
||||
>> `htpasswd -b -c ./nginx/htpasswd username password`
|
||||
>> `echo "username:$(openssl passwd -apr1 password)" >> data/htpasswd`
|
||||
|
||||
File: nginx.conf
|
||||
|
||||
```
|
||||
```nginx
|
||||
user nginx;
|
||||
worker_processes 4;
|
||||
|
||||
@ -79,7 +79,7 @@ http {
|
||||
|
||||
File: default
|
||||
|
||||
```
|
||||
```nginx
|
||||
server {
|
||||
listen 80 default;
|
||||
server_name _;
|
||||
@ -118,7 +118,7 @@ server {
|
||||
|
||||
File: [rtmp][1]
|
||||
|
||||
```
|
||||
```nginx
|
||||
rtmp {
|
||||
server {
|
||||
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:
|
||||
image: vimagick/nginx
|
||||
ports:
|
||||
- "80:80"
|
||||
image: nginx:alpine
|
||||
volumes:
|
||||
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
|
||||
- ./html:/usr/share/nginx/html
|
||||
- ./data/default.conf:/etc/nginx/conf.d/default.conf
|
||||
- ./data/ssl:/etc/nginx/ssl
|
||||
net: host
|
||||
restart: always
|
||||
|
Loading…
Reference in New Issue
Block a user