services: ts-prometheus: image: tailscale/tailscale:latest hostname: prometheus environment: - TS_AUTHKEY=tskey-client-kcSo6Wfga411CNTRL-y3Sbf7VZjVCHumLLmUYcVCGe1H2tGRf6?ephemeral=false - TS_EXTRA_ARGS=--advertise-tags=tag:container - TS_STATE_DIR=/var/lib/tailscale # Tell Tailscale how to serve Bazarr securely inside the tailnet - TS_SERVE_CONFIG=/config/serve.json volumes: - tailscale-data-prometheus:/var/lib/tailscale - ~/ts-prometheus/config:/config devices: - /dev/net/tun:/dev/net/tun cap_add: - net_admin - sys_module restart: unless-stopped prometheus: image: prom/prometheus:latest container_name: prometheus network_mode: service:ts-prometheus command: # Tell Prometheus to use the mounted configuration file - --config.file=/etc/prometheus/prometheus.yml # Tell Prometheus where to store its time series data - --storage.tsdb.path=/prometheus volumes: # 1. Mount the local prometheus.yml file into the container's config path - ./prometheus.yml:/etc/prometheus/prometheus.yml # 2. Use a named volume for persistent storage of the time series data - prometheus_data:/prometheus restart: unless-stopped volumes: tailscale-data-prometheus: prometheus_data: {}