Docker deployment files for bricksandblocks.net
All services ship logs to Loki via the Loki Docker logging driver plugin. This must be installed on each host before deploying any services:
docker plugin install grafana/loki-docker-driver:latest --alias loki --grant-all-permissionsNote for Synology DSM hosts: the plugin must be installed over SSH as root. It survives container restarts but may need to be reinstalled after a DSM major version upgrade.
VPN-routed services — the gluetun-backed qbittorrent_aio stack — bind /dev/net/tun, which requires the host tun kernel module. Load it and persist it across reboots before deploying those services:
mkdir -p /etc/modules-load.d
echo tun > /etc/modules-load.d/tun.conf
modprobe tunNote for Synology DSM hosts:
systemd-modules-load.servicereads/etc/modules-load.d/at boot, but a DSM major version upgrade may clear the directory, so the file may need to be recreated afterward.
- Make a copy of
env.distcalled.env - Fill in appropriate values for
.env - Run update and setup tasks
task update
task setup- Backup local mounts to a data host:
task backup:local - Deploy a service:
task deploy -- compose/[role].yml - Deploy all services for a host:
task deploy -- compose/[hostname].yml - Destroy a service:
task destroy -- compose/[role].yml - Check a service's logs:
docker logs --follow [role] - Pull the latest containers for a service:
task upgrade -- compose/[role].yml - Update repository:
task update
Pull requests welcome.