diff --git a/services/tautulli/config/docker-compose.yml b/services/tautulli/config/docker-compose.yml new file mode 100644 index 0000000..e4e6ef4 --- /dev/null +++ b/services/tautulli/config/docker-compose.yml @@ -0,0 +1,23 @@ +services: + # Tailscale Sidecar Configuration + tailscale: + extends: + file: docker-tailscale.yml #Pull the standard/most common settings from the file + service: tailscale-common + hostname: tautulli # Name used within your Tailscale environment + ports: + - 0.0.0.0:8181:8181 # Binding port 8181 to the local network - may be removed if only exposure to your Tailnet is required + + # ${SERVICE} + application: + extends: + file: docker-tailscale.yml #Pull the standard/most common settings from the file + service: common + container_name: app-${SERVICE} # Name for local container management + volumes: + - ${PWD}/${SERVICE}-data/app/config:/config + depends_on: + tailscale: + condition: service_healthy + environment: + - PUID=1000 diff --git a/services/tautulli/config/docker-tailscale.yml b/services/tautulli/config/docker-tailscale.yml new file mode 100644 index 0000000..efc84e6 --- /dev/null +++ b/services/tautulli/config/docker-tailscale.yml @@ -0,0 +1,40 @@ +services: + # Tailscale Sidecar Configuration + tailscale-common: + image: tailscale/tailscale:latest # Image to be used + container_name: tailscale-${SERVICE} # Name for local container management + cap_add: + - net_admin + - sys_module + 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 + volumes: + - ${PWD}/tautulli/config:/config # Config folder used to store Tailscale files - you may need to change the path + - ${PWD}/tautulli/tailscale-tautulli/state:/var/lib/tailscale # Tailscale requirement - you may need to change the path + - /dev/net/tun:/dev/net/tun # Network configuration for Tailscale to work + 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 + + common: + image: ${IMAGE_URL} # Image to be used + 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 + network_mode: service:tailscale # Sidecar configuration to route ${SERVICE} through Tailscale + environment: + - PGID=1000 + - TZ=Europe/Amsterdam \ No newline at end of file