feat: enhance installation script to include automatic Watchtower setup with customizable interval

This commit is contained in:
Anish Sarkar 2026-02-27 04:41:08 +05:30
parent 48ee5e86aa
commit 4e401fdb92
3 changed files with 68 additions and 16 deletions

View file

@ -9,7 +9,7 @@ This guide explains how to run SurfSense using Docker, with options ranging from
### Option 1 — Install Script (recommended)
Downloads the compose files, generates a `SECRET_KEY`, and starts all services automatically:
Downloads the compose files, generates a `SECRET_KEY`, starts all services, and sets up [Watchtower](https://github.com/nicholas-fedor/watchtower) for automatic daily updates:
```bash
curl -fsSL https://raw.githubusercontent.com/MODSetter/SurfSense/main/docker/scripts/install.sh | bash
@ -17,6 +17,14 @@ curl -fsSL https://raw.githubusercontent.com/MODSetter/SurfSense/main/docker/scr
This creates a `./surfsense/` directory with `docker-compose.yml` and `.env`, then runs `docker compose up -d`.
To skip Watchtower (e.g. in production where you manage updates yourself):
```bash
curl -fsSL https://raw.githubusercontent.com/MODSetter/SurfSense/main/docker/scripts/install.sh | bash -s -- --no-watchtower
```
To customise the check interval (default 24h), use `--watchtower-interval=SECONDS`.
### Option 2 — Manual Docker Compose
```bash
@ -40,8 +48,13 @@ After starting, access SurfSense at:
**Option 1 — Watchtower daemon (recommended, auto-updates every 24 h):**
If you used the install script (Option 1 above), Watchtower is already running. No extra setup needed.
For manual Docker Compose installs (Option 2), start Watchtower separately:
```bash
docker run -d --name watchtower \
--restart unless-stopped \
-v /var/run/docker.sock:/var/run/docker.sock \
nickfedor/watchtower \
--label-enable \