Skip to content

Instantly share code, notes, and snippets.

View mrhahn3000's full-sized avatar

Kevin Faust mrhahn3000

View GitHub Profile
@mrhahn3000
mrhahn3000 / ghost_backup.sh
Created October 3, 2017 17:27
A script for creating a backup of the Ghost Blog content (folder and database).
#!/bin/bash
#
echo "Create backup of ghost ... please wait ..."
DINFO=`date +%F`
GHOST_DIR=/path/to/ghost/install
DB_NAME=NAME-OF-YOUR-GHOST-MARIA-DB
BACKUP_DIR=/opt/backups
tar -cjPf $BACKUP_DIR/$DINFO-ghost-backup.tar.bz2 "$GHOST_DIR/content/"
echo "Backup created."
echo "Delete all backups except the last 5 ... please wait ..."
@mrhahn3000
mrhahn3000 / caching.conf
Last active January 26, 2021 16:40
This is a very good configuration for Ghost Blog behind an ngnix web server hosted on a Raspberry Pi. All settings regarding security, secrecy and performance :) Using Let's encrypt as certificate provider.
##
# Caching
##
# sets the proxy cache path location, max size 2g
proxy_cache_path /var/cache/nginx/ levels=1:2 keys_zone=blog_cache:10m max_size=2g inactive=120m;
# add a cache HIT/MISS header
add_header X-Proxy-Cache $upstream_cache_status;