1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-12-23 01:39:27 +02:00

update ghost

This commit is contained in:
kev 2022-01-21 11:50:30 +08:00
parent c66bb5d373
commit cd6b9a7eae
2 changed files with 37 additions and 0 deletions

View File

@ -7,9 +7,12 @@ ghost
```yaml
version: "3.8"
services:
ghost:
image: ghost:alpine
container_name: ghost
ports:
- "2368:2368"
volumes:
@ -19,6 +22,21 @@ services:
- database__client=sqlite3
- database__connection__filename=/var/lib/ghost/content/data/ghost.db
restart: unless-stopped
backup:
image: offen/docker-volume-backup
container_name: backup
environment:
- BACKUP_FILENAME=backup-ghost-%Y-%m-%dT%H-%M-%S.tar.gz
- BACKUP_PRUNING_PREFIX=backup-ghost-
- BACKUP_RETENTION_DAYS=30
volumes:
- ./data:/backup/ghost:ro
- ./backups:/archive
- /var/run/docker.sock:/var/run/docker.sock:ro
depends_on:
- ghost
restart: unless-stopped
```
## Up and Running
@ -26,6 +44,7 @@ services:
```bash
$ docker-compose up -d
$ curl https://blog.easypi.duckdns.org/ghost/
$ docker-compose exec backup backup
```
## Setup SSL

View File

@ -1,7 +1,10 @@
version: "3.8"
services:
ghost:
image: ghost:alpine
container_name: ghost
ports:
- "2368:2368"
volumes:
@ -11,3 +14,18 @@ services:
- database__client=sqlite3
- database__connection__filename=/var/lib/ghost/content/data/ghost.db
restart: unless-stopped
backup:
image: offen/docker-volume-backup
container_name: backup
environment:
- BACKUP_FILENAME=backup-ghost-%Y-%m-%dT%H-%M-%S.tar.gz
- BACKUP_PRUNING_PREFIX=backup-ghost-
- BACKUP_RETENTION_DAYS=30
volumes:
- ./data:/backup/ghost:ro
- ./backups:/archive
- /var/run/docker.sock:/var/run/docker.sock:ro
depends_on:
- ghost
restart: unless-stopped