Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using docker compose extends to standardize even more... #72

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions services/tautulli/config/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -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
40 changes: 40 additions & 0 deletions services/tautulli/config/docker-tailscale.yml
Original file line number Diff line number Diff line change
@@ -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