From 693c899d9da2bad20c879f67bab45745f1a39bda Mon Sep 17 00:00:00 2001 From: crypt0rr <57799908+crypt0rr@users.noreply.github.com> Date: Sun, 17 Aug 2025 11:15:02 +0200 Subject: [PATCH 1/2] Added Subtrackr --- README.md | 1 + services/subtrackr/.env | 8 ++++ services/subtrackr/README.md | 21 ++++++++++ services/subtrackr/config/serve.json | 16 +++++++ services/subtrackr/docker-compose.yml | 60 +++++++++++++++++++++++++++ 5 files changed, 106 insertions(+) create mode 100644 services/subtrackr/.env create mode 100644 services/subtrackr/README.md create mode 100644 services/subtrackr/config/serve.json create mode 100644 services/subtrackr/docker-compose.yml diff --git a/README.md b/README.md index bbad69c..4cd2423 100644 --- a/README.md +++ b/README.md @@ -90,6 +90,7 @@ If you would like to add your own config, you can use the [service-template](tem | 🗂️ **Copyparty** | A self-hosted file server with accelerated resumable uploads. | [Details](services/copyparty) | | 💸 **Wallos** | An open-source, self-hostable web app to track and manage your recurring subscriptions and expenses, with multi-currency support, customizable categories, and statistics. | [Details](services/wallos) | | 🧑‍🧑‍🧒‍🧒 **Gramps Web** | A web-based genealogy platform for collaborative family tree browsing, editing, AI-powered chat, media tagging, mapping, charts, search, and reporting. | [Details](services/grampsweb) | +| **Subtrackr** | A self-hosted web app to track subscriptions, renewal dates, costs, and payment methods. | [Details](services/subtrackr) | ### 📊 Dashboards and Visualization diff --git a/services/subtrackr/.env b/services/subtrackr/.env new file mode 100644 index 0000000..c5423e4 --- /dev/null +++ b/services/subtrackr/.env @@ -0,0 +1,8 @@ +#version=1.0 +#url=https://github.com/2Tiny2Scale/tailscale-docker-sidecar-configs +#COMPOSE_PROJECT_NAME= // only use in multiple deployments on the same infra +SERVICE=subtrackr +IMAGE_URL=ghcr.io/bscott/subtrackr +SERVICEPORT=8080 +TS_AUTHKEY= +DNS_SERVER=9.9.9.9 diff --git a/services/subtrackr/README.md b/services/subtrackr/README.md new file mode 100644 index 0000000..aedd00e --- /dev/null +++ b/services/subtrackr/README.md @@ -0,0 +1,21 @@ +# Subtrackr with Tailscale Sidecar Configuration + +This Docker Compose configuration sets up [**Subtrackr**](https://github.com/bscott/subtrackr) with Tailscale as a sidecar container, enabling secure access to your self-hosted subscription tracking platform from anywhere on your private Tailscale network. With this setup, your Subtrackr instance remains fully private and accessible only from authorized devices. + +## Subtrackr + +[**Subtrackr**](https://github.com/bscott/subtrackr) is an open-source, self-hosted web application for managing and tracking recurring subscriptions. It provides a clean, modern interface to help you monitor costs, renewal dates, and payment methods across all your services. Designed for individuals and households, Subtrackr makes it easy to stay on top of your digital and physical subscriptions without relying on third-party services. + +## Key Features + +* **Centralized Subscription Management** – Keep all your recurring subscriptions organized in one place. +* **Expense Tracking** – Monitor total spending, breakdowns, and trends across services. +* **Renewal Reminders** – Stay informed with upcoming renewal and billing notifications. +* **Service Categorization** – Group subscriptions by category for clear overviews (e.g., streaming, utilities, software). +* **Payment Method Tracking** – Associate subscriptions with credit cards, bank accounts, or other payment methods. +* **Responsive Web Interface** – A simple, mobile-friendly UI for adding and reviewing subscriptions. +* **Self-Hosted & Open Source** – Run Subtrackr on your own infrastructure with Docker, ensuring privacy and data ownership. + +## Configuration Overview + +In this deployment, the `tailscale-subtrackr` service runs the Tailscale client to establish a secure private network. The `subtrackr` container uses `network_mode: service:tailscale-subtrackr` to route all traffic through the Tailscale interface. This ensures that your subscription data, dashboards, and administration interface are only accessible via Tailscale, preventing public exposure. diff --git a/services/subtrackr/config/serve.json b/services/subtrackr/config/serve.json new file mode 100644 index 0000000..daa829e --- /dev/null +++ b/services/subtrackr/config/serve.json @@ -0,0 +1,16 @@ +{ + "TCP": { + "443": { + "HTTPS": true + } + }, + "Web": { + "${TS_CERT_DOMAIN}:443": { + "Handlers": { + "/": { + "Proxy": "http://127.0.0.1:8080" + } + } + } + } +} \ No newline at end of file diff --git a/services/subtrackr/docker-compose.yml b/services/subtrackr/docker-compose.yml new file mode 100644 index 0000000..4b81447 --- /dev/null +++ b/services/subtrackr/docker-compose.yml @@ -0,0 +1,60 @@ +services: +# Make sure you have updated/checked the .env file with the correct variables. +# All the ${ xx } need to be defined there. + # Tailscale Sidecar Configuration + tailscale: + image: tailscale/tailscale:latest # Image to be used + container_name: tailscale-${SERVICE} # Name for local container management + hostname: ${SERVICE} # Name used within your Tailscale environment + environment: + - TS_AUTHKEY=${TS_AUTHKEY} + - TS_STATE_DIR=/var/lib/tailscale + - TS_SERVE_CONFIG=/config/serve.json # Tailsacale Serve configuration to expose the web interface on your local Tailnet - remove this line if not required + - TS_USERSPACE=false + - TS_ENABLE_HEALTH_CHECK=true # Enable healthcheck endpoint: "/healthz" + - TS_LOCAL_ADDR_PORT=127.0.0.1:41234 # The : for the healthz endpoint + #- TS_ACCEPT_DNS=true # Uncomment when using MagicDNS + volumes: + - ${PWD}/config:/config # Config folder used to store Tailscale files - you may need to change the path + - ${PWD}/ts/state:/var/lib/tailscale # Tailscale requirement - you may need to change the path + devices: + - /dev/net/tun:/dev/net/tun # Network configuration for Tailscale to work + cap_add: + - net_admin # Tailscale requirement + - sys_module # Tailscale requirement + #ports: + # - 0.0.0.0:${SERVICEPORT}:${SERVICEPORT} # Binding port ${SERVICE}PORT to the local network - may be removed if only exposure to your Tailnet is required + # If any DNS issues arise, use your preferred DNS provider by uncommenting the config below + #dns: + # - ${DNS_SERVER} + healthcheck: + test: ["CMD", "wget", "--spider", "-q", "http://127.0.0.1:41234/healthz"] # Check Tailscale has a Tailnet IP and is operational + interval: 1m # How often to perform the check + timeout: 10s # Time to wait for the check to succeed + retries: 3 # Number of retries before marking as unhealthy + start_period: 10s # Time to wait before starting health checks + restart: always + + # ${SERVICE} + application: + image: ${IMAGE_URL} # Image to be used + network_mode: service:tailscale # Sidecar configuration to route ${SERVICE} through Tailscale + container_name: app-${SERVICE} # Name for local container management + environment: + - PUID=1000 + - PGID=1000 + - TZ=Europe/Amsterdam + - GIN_MODE=release + - DATABASE_PATH=/app/data/subtrackr.db + volumes: + - ${PWD}/${SERVICE}-data/data:/app/data + depends_on: + tailscale: + condition: service_healthy + healthcheck: + test: ["CMD", "pgrep", "-f", "${SERVICE}"] # Check if ${SERVICE} process is running + interval: 1m # How often to perform the check + timeout: 10s # Time to wait for the check to succeed + retries: 3 # Number of retries before marking as unhealthy + start_period: 30s # Time to wait before starting health checks + restart: always \ No newline at end of file From 43e627ae4a41759ef1730c8a9c44386844610d07 Mon Sep 17 00:00:00 2001 From: crypt0rr <57799908+crypt0rr@users.noreply.github.com> Date: Sun, 17 Aug 2025 11:19:00 +0200 Subject: [PATCH 2/2] Update health --- services/subtrackr/docker-compose.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/services/subtrackr/docker-compose.yml b/services/subtrackr/docker-compose.yml index 4b81447..33d3758 100644 --- a/services/subtrackr/docker-compose.yml +++ b/services/subtrackr/docker-compose.yml @@ -51,10 +51,10 @@ services: depends_on: tailscale: condition: service_healthy - healthcheck: - test: ["CMD", "pgrep", "-f", "${SERVICE}"] # Check if ${SERVICE} process is running - interval: 1m # How often to perform the check - timeout: 10s # Time to wait for the check to succeed - retries: 3 # Number of retries before marking as unhealthy - start_period: 30s # Time to wait before starting health checks + # healthcheck: + # test: ["CMD", "pgrep", "-f", "${SERVICE}"] # Check if ${SERVICE} process is running + # interval: 1m # How often to perform the check + # timeout: 10s # Time to wait for the check to succeed + # retries: 3 # Number of retries before marking as unhealthy + # start_period: 30s # Time to wait before starting health checks restart: always \ No newline at end of file