From 1d043702ef136e8f2e516c5304a57be5718f1f6f Mon Sep 17 00:00:00 2001 From: Tyler Hoang Date: Thu, 9 Jul 2026 21:49:56 -0700 Subject: Initial commit: docker compose files for all self-hosted services 12 services: adguard, ampache, azuracast, flood, glance, glances, grafana, immich, invidious, jellyfin, openwebui, watchtower Each service includes a docker-compose.yml, README.md with setup instructions, and .env.example where applicable. --- watchtower/.env.example | 6 ++++++ watchtower/README.md | 25 +++++++++++++++++++++++++ watchtower/docker-compose.yml | 19 +++++++++++++++++++ 3 files changed, 50 insertions(+) create mode 100644 watchtower/.env.example create mode 100644 watchtower/README.md create mode 100644 watchtower/docker-compose.yml (limited to 'watchtower') diff --git a/watchtower/.env.example b/watchtower/.env.example new file mode 100644 index 0000000..a5e5686 --- /dev/null +++ b/watchtower/.env.example @@ -0,0 +1,6 @@ +SMTP_FROM=watchtower@example.com +SMTP_TO=you@example.com +SMTP_SERVER=mail.example.com +SMTP_PORT=587 +SMTP_USER=you@example.com +SMTP_PASS=your_smtp_password_here diff --git a/watchtower/README.md b/watchtower/README.md new file mode 100644 index 0000000..1d3bc8b --- /dev/null +++ b/watchtower/README.md @@ -0,0 +1,25 @@ +# Watchtower + +Automatically updates running Docker containers to the latest image versions. + +## Setup + +1. Copy `.env.example` to `.env`: + ``` + cp .env.example .env + ``` + +2. Edit `.env` with your SMTP credentials for email notifications. + +3. Start: + ``` + docker compose up -d + ``` + +## What to Configure + +- **`.env`** — All SMTP settings. Watchtower will send email notifications after updates (or if updates fail). +- **Schedule** — `WATCHTOWER_SCHEDULE=0 0 4 * * 0` runs every Sunday at 4 AM. Uses 6-field cron. Change as desired. +- **Docker socket** — Mounts `/var/run/docker.sock`. Required for Watchtower to manage containers. +- **Cleanup** — `WATCHTOWER_CLEANUP=true` removes old images after updates. Set to `false` if you want to keep them. +- **Scope labels** — To exclude a container from auto-updates, add `com.centurylinklabs.watchtower.scope=ignore` to its container labels. diff --git a/watchtower/docker-compose.yml b/watchtower/docker-compose.yml new file mode 100644 index 0000000..73a1c60 --- /dev/null +++ b/watchtower/docker-compose.yml @@ -0,0 +1,19 @@ +services: + watchtower: + image: nickfedor/watchtower + container_name: watchtower + restart: unless-stopped + volumes: + - /var/run/docker.sock:/var/run/docker.sock + environment: + - WATCHTOWER_SCHEDULE=0 0 4 * * 0 # Sundays 4am (6-field cron) + - WATCHTOWER_CLEANUP=true # remove old images after update + - WATCHTOWER_INCLUDE_RESTARTING=true + - WATCHTOWER_NOTIFICATIONS=email + - WATCHTOWER_NOTIFICATION_EMAIL_FROM=${SMTP_FROM} + - WATCHTOWER_NOTIFICATION_EMAIL_TO=${SMTP_TO} + - WATCHTOWER_NOTIFICATION_EMAIL_SERVER=${SMTP_SERVER} + - WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PORT=${SMTP_PORT} + - WATCHTOWER_NOTIFICATION_EMAIL_SERVER_USER=${SMTP_USER} + - WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PASSWORD=${SMTP_PASS} + - WATCHTOWER_NOTIFICATION_EMAIL_USE_SSL_SMTP=true # for STARTTLS on 587 -- cgit v1.3-2-g0d8e