Compare commits

...

2 Commits

Author SHA1 Message Date
aki
8c5cdb111d fix(env): Update Tailscale settings and add homepage configuration options
Some checks failed
/ validate-docker-compose (push) Has been cancelled
2025-04-25 13:08:06 +08:00
aki
42ee02d8e7 fix(homepage): Update allowed hosts and add basic auth middleware configuration 2025-04-25 13:07:53 +08:00
2 changed files with 76 additions and 25 deletions

View File

@ -1,20 +1,71 @@
# --- Docker Compose Settings ---
# Comma-separated list of optional service profiles to enable (e.g., lidarr,sabnzbd,adguardhome)
COMPOSE_PROFILES= COMPOSE_PROFILES=
# Path separator for COMPOSE_FILE (use ';' for Windows)
COMPOSE_PATH_SEPARATOR=: COMPOSE_PATH_SEPARATOR=:
# Colon-separated list of compose files to use. Allows extending the base configuration.
COMPOSE_FILE=docker-compose.yml:adguardhome/docker-compose.yml:tandoor/docker-compose.yml:joplin/docker-compose.yml:homeassistant/docker-compose.yml:immich/docker-compose.yml COMPOSE_FILE=docker-compose.yml:adguardhome/docker-compose.yml:tandoor/docker-compose.yml:joplin/docker-compose.yml:homeassistant/docker-compose.yml:immich/docker-compose.yml
# --- Core System Settings ---
# Linux User ID. Find yours with `id -u`. Crucial for file permissions.
USER_ID=1000 USER_ID=1000
# Linux Group ID. Find yours with `id -g`. Crucial for file permissions.
GROUP_ID=1000 GROUP_ID=1000
# Your local timezone (e.g., America/New_York, Europe/London, Asia/Manila). See: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
TIMEZONE="America/New_York" TIMEZONE="America/New_York"
# --- Host Paths ---
# Base directory on host for storing service configuration files. '.' stores them in subdirectories within the project folder.
CONFIG_ROOT="." CONFIG_ROOT="."
# Main directory on host containing media libraries (movies, TV, music, books).
DATA_ROOT="/mnt/data" DATA_ROOT="/mnt/data"
# Directory on host for download clients (qBittorrent/SABnzbd). Should be on the same filesystem as DATA_ROOT for hardlinks.
DOWNLOAD_ROOT="/mnt/data/torrents" DOWNLOAD_ROOT="/mnt/data/torrents"
# Upload location for Immich (if profile enabled)
IMMICH_UPLOAD_LOCATION="/mnt/data/photos" IMMICH_UPLOAD_LOCATION="/mnt/data/photos"
HOMEASSISTANT_HOSTNAME=
IMMICH_HOSTNAME= # --- Tailscale Settings ---
ADGUARD_HOSTNAME= # Required. Auth key from Tailscale Admin Console (Settings > Keys). Use a reusable or ephemeral key.
ADGUARD_USERNAME= TAILSCALE_AUTHKEY=
ADGUARD_PASSWORD= # Desired hostname for this NAS within your Tailscale network.
TAILSCALE_HOSTNAME=tailscale-nas
# Required. Your Tailnet domain (e.g., your-tailnet-name.ts.net).
TAILSCALE_TAILNET_DOMAIN=your-tailnet.ts.net
# Optional tags to apply to the Tailscale node (e.g., tag:nas).
TAILSCALE_TAGS=tag:nas
# Enable Tailscale Funnel (public access) for HTTPS? Set to 'true' or 'false'. 'false' uses Serve (Tailnet only, recommended).
ENABLE_FUNNEL_HTTPS=false
# --- Primary Hostname ---
# Primary hostname used by Traefik for routing. Derived from Tailscale settings by default.
HOSTNAME=${TAILSCALE_HOSTNAME}.${TAILSCALE_TAILNET_DOMAIN}
# --- Application Credentials ---
# qBittorrent Web UI Credentials (change default!)
QBITTORRENT_USERNAME=admin QBITTORRENT_USERNAME=admin
QBITTORRENT_PASSWORD=adminadmin QBITTORRENT_PASSWORD=adminadmin
# Calibre-Web Credentials (if profile enabled)
CALIBRE_USERNAME=admin
CALIBRE_PASSWORD=admin123
# Immich Database Password (if profile enabled)
IMMICH_DB_PASSWORD=postgres
# --- Homepage Settings ---
HOMEPAGE_VAR_TITLE="Docker-Compose NAS"
HOMEPAGE_VAR_SEARCH_PROVIDER=google
HOMEPAGE_VAR_HEADER_STYLE=boxed
# Weather Widget (Optional)
HOMEPAGE_VAR_WEATHER_CITY=
HOMEPAGE_VAR_WEATHER_LAT=
HOMEPAGE_VAR_WEATHER_LONG=
HOMEPAGE_VAR_WEATHER_UNIT=metric
# Homepage Basic Authentication (Optional) - Generate hash with htpasswd (e.g., `htpasswd -nb user password`)
# See README for details. Leave blank to disable auth.
HOMEPAGE_AUTH_USER=
HOMEPAGE_AUTH_HASH=
# --- API Keys & Integration Tokens (Optional - Mainly for Homepage Widgets) ---
# Find API keys within each application's settings (usually Settings > General or Security)
SONARR_API_KEY= SONARR_API_KEY=
RADARR_API_KEY= RADARR_API_KEY=
LIDARR_API_KEY= LIDARR_API_KEY=
@ -25,16 +76,12 @@ JELLYSEERR_API_KEY=
SABNZBD_API_KEY= SABNZBD_API_KEY=
IMMICH_API_KEY= IMMICH_API_KEY=
HOMEASSISTANT_ACCESS_TOKEN= HOMEASSISTANT_ACCESS_TOKEN=
HOMEPAGE_VAR_TITLE="Docker-Compose NAS" # AdGuard Home Credentials (if profile enabled)
HOMEPAGE_VAR_SEARCH_PROVIDER=google ADGUARD_USERNAME=
HOMEPAGE_VAR_HEADER_STYLE=boxed ADGUARD_PASSWORD=
HOMEPAGE_VAR_WEATHER_CITY=
HOMEPAGE_VAR_WEATHER_LAT= # --- Optional Service Settings ---
HOMEPAGE_VAR_WEATHER_LONG= # Decluttarr Settings (if profile enabled)
HOMEPAGE_VAR_WEATHER_UNIT=metric
IMMICH_DB_PASSWORD=postgres
CALIBRE_USERNAME=admin
CALIBRE_PASSWORD=admin123
DECLUTTARR_TEST_RUN=True DECLUTTARR_TEST_RUN=True
DECLUTTARR_REMOVE_TIMER=60 DECLUTTARR_REMOVE_TIMER=60
DECLUTTARR_REMOVE_FAILED=True DECLUTTARR_REMOVE_FAILED=True
@ -43,12 +90,8 @@ DECLUTTARR_REMOVE_METADATA_MISSING=True
DECLUTTARR_REMOVE_MISSING_FILES=True DECLUTTARR_REMOVE_MISSING_FILES=True
DECLUTTARR_REMOVE_ORPHANS=True DECLUTTARR_REMOVE_ORPHANS=True
# --- Tailscale Settings --- # --- Other Hostnames (Optional Services) ---
TAILSCALE_AUTHKEY= # Set these if you need specific hostnames for these services (e.g., for Home Assistant integrations)
TAILSCALE_HOSTNAME=tailscale-nas HOMEASSISTANT_HOSTNAME=
TAILSCALE_TAILNET_DOMAIN=your-tailnet.ts.net IMMICH_HOSTNAME=
TAILSCALE_TAGS=tag:nas ADGUARD_HOSTNAME=
# Enable Tailscale Funnel (public access) for HTTPS? Set to 'true' or 'false'.
ENABLE_FUNNEL_HTTPS=false
HOSTNAME=${TAILSCALE_HOSTNAME}.${TAILSCALE_TAILNET_DOMAIN}

View File

@ -467,7 +467,11 @@ services:
- HOMEPAGE_VAR_WEATHER_LONG=${HOMEPAGE_VAR_WEATHER_LONG} - HOMEPAGE_VAR_WEATHER_LONG=${HOMEPAGE_VAR_WEATHER_LONG}
- HOMEPAGE_VAR_WEATHER_TIME=${TIMEZONE} - HOMEPAGE_VAR_WEATHER_TIME=${TIMEZONE}
- HOMEPAGE_VAR_WEATHER_UNIT=${HOMEPAGE_VAR_WEATHER_UNIT} - HOMEPAGE_VAR_WEATHER_UNIT=${HOMEPAGE_VAR_WEATHER_UNIT}
- HOMEPAGE_ALLOWED_HOSTS=${HOSTNAME} # Allow access from localhost, the service name, and the primary HOSTNAME
- HOMEPAGE_ALLOWED_HOSTS=localhost,homepage,${HOSTNAME}
# Pass auth user/hash if set (optional, for potential future use by homepage itself, though Traefik handles it)
- HOMEPAGE_AUTH_USER=${HOMEPAGE_AUTH_USER}
- HOMEPAGE_AUTH_HASH=${HOMEPAGE_AUTH_HASH}
volumes: volumes:
- ${CONFIG_ROOT:-.}/homepage:/app/config:Z - ${CONFIG_ROOT:-.}/homepage:/app/config:Z
- /var/run/docker.sock:/var/run/docker.sock:ro - /var/run/docker.sock:/var/run/docker.sock:ro
@ -479,6 +483,10 @@ services:
- traefik.enable=true - traefik.enable=true
- traefik.http.routers.homepage.rule=PathPrefix(`/`) - traefik.http.routers.homepage.rule=PathPrefix(`/`)
- traefik.http.routers.homepage.entrypoints=web - traefik.http.routers.homepage.entrypoints=web
# Define Basic Auth Middleware (only active if HOMEPAGE_AUTH_HASH is set in .env)
- traefik.http.middlewares.homepage-auth.basicAuth.users=${HOMEPAGE_AUTH_HASH}
# Apply Middleware to Router
- traefik.http.routers.homepage.middlewares=homepage-auth@docker
- traefik.http.services.homepage.loadbalancer.server.port=3000 - traefik.http.services.homepage.loadbalancer.server.port=3000
watchtower: watchtower:
image: ghcr.io/containrrr/watchtower:latest image: ghcr.io/containrrr/watchtower:latest