A Continuous Deployment of my Blog
Shell
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
jmkhael.io
.gitignore
POST.md
README.md
backup.sh
build.armv7.sh
build.sh
docker-compose.armv7.yml
docker-compose.yml
pull.sh
run.armv7.sh
run.sh
setup.sh

README.md

Build this blog

Clone this repository then:

Download and setup the blog S3 bucket

./setup.sh

Build the Docker image

./build.sh

Run the blog stack

./pull.sh
./run.sh

Backup

Backup content folder using minio mc client, which is S3 compatible.

./backup.sh

Add a cron to backup.sh

crontab -e

Then add a line:

30 * * * * bash /home/pi/workspace/blog/backup.sh > /tmp/backup.txt

Host it on a Raspberry Pi

Flash

flash --hostname dockyard  --ssid WIFI-SSID --password WIFI_PASSWORD \
https://github.com/hypriot/image-builder-rpi/releases/download/v1.9.0/hypriotos-rpi-v1.9.0.img.zip

ssh pirate@dockyard
docker swarm init --advertise-addr eth0

mkdir workspace
cd workspace/
git clone https://github.com/jmkhael/blog
cd blog/
./setup.sh
mc config host add s3 https://s3.amazonaws.com ACCESS_KEY SECRET_KEY
./pull.sh
./run.armv7.sh
watch docker service ls