Auto init via environment variables support, qu init for systemd
Container image / image (push) Successful in 1m38s

This commit is contained in:
2026-05-15 04:41:45 +00:00
parent 6953709574
commit e11b3f4547
9 changed files with 475 additions and 113 deletions
+25 -8
View File
@@ -1,5 +1,14 @@
# An example of a docker compose with Tailscale & QUptime.
# This setup is specifically intended for hosts that may not be able to reach each other directly or have a public IP address.
# This setup is specifically intended for hosts that may not be able to
# reach each other directly or have a public IP address.
#
# Bring it up with `docker compose -f docker-compose-tailscale.yml up -d`.
# QUptime auto-initialises on first start using the QUPTIME_* env vars
# below — no separate `qu init` step is required.
#
# On the first node, omit QUPTIME_CLUSTER_SECRET to have one generated
# for you. Read it out of the logs (`docker logs quptime`) and copy it
# into the .env of every other node before bringing them up.
services:
tailscale:
@@ -18,20 +27,28 @@ services:
quptime:
image: git.cer.sh/axodouble/quptime:master
container_name: quptime
environment:
# host:port other QUptime nodes use to reach this one. Use the
# Tailscale IP / MagicDNS name of this host. Required behind NAT.
- QUPTIME_ADVERTISE=${QUPTIME_ADVERTISE}
# Shared cluster join secret. Set on every node. Leave unset on
# the very first node — one will be generated and logged for you
# to copy to the others. Followers MUST set this before starting.
- QUPTIME_CLUSTER_SECRET=${QUPTIME_CLUSTER_SECRET:-}
# Optional: pin a port other than the default 9901.
# - QUPTIME_BIND_PORT=9901
volumes:
- quptime:/etc/quptime
ports:
- "9901:9901"
depends_on:
- tailscale
# No restart directive, user needs to init quptime first
# Run `docker compose -f docker-compose-tailscale.yml run --rm quptime init` to initialize
# the data volume before starting the service
# If this is not the master node, use
# `docker compose -f docker-compose-tailscale.yml run --rm quptime --advertise <TAILSCALE_IP>:9901 --secret <SECRET>`
# And add the individual nodes to the cluster with `docker compose -f docker-compose-tailscale.yml run --rm quptime node add <OTHER_NODE_IP>:9901`
network_mode: "service:tailscale" # Use the Tailscale network stack
restart: unless-stopped
# After this node is up, add peers from the master with:
# docker compose -f docker-compose-tailscale.yml exec quptime \
# qu node add <OTHER_NODE_TAILSCALE_IP>:9901
volumes:
tailscale:
quptime:
quptime: