server-dotfiles/patrizio/docker-compose.yml
Davide Polonio ec155abe4a feat(patrizio): configure Tailscale DNS and automatic connection
Add custom DNS records for internal services (pihole and ollama) and configure
Tailscale to start automatically with accept-dns flag and custom login server.
Remove static DNS configuration in favor of extra_records approach.

Signed-off-by: Davide Polonio <davide.polonio@infinitaslearning.com>
2026-04-06 19:25:50 +02:00

58 lines
1.4 KiB
YAML

services:
patrizio:
image: ghcr.io/polpetta/patrizio-bot:v0.2.0
network_mode: service:tailscale
restart: unless-stopped
command: -f /data/ serve
volumes:
- ./data:/data:rw
- ./patrizio.toml:/etc/patrizio/patrizio.toml:ro
depends_on:
tailscale:
condition: service_healthy
logging:
driver: "json-file"
options:
mode: "non-blocking"
max-size: "10m"
max-file: "3"
tailscale:
hostname: patrizio
image: tailscale/tailscale:latest
restart: unless-stopped
extra_records:
- name: "pi.hole"
type: "A"
value: "100.64.0.4"
- name: "pihole.lan.poldebra.me"
type: "A"
value: "100.64.0.4"
- name: "ollama.lan.poldebra.me"
type: "A"
value: "100.64.0.7"
command: >
- sh -c "tailscaled &
- sleep 5 &&
- tailscale up --accept-dns=true --login-server=https://vpn.poldebra.me &&
- wait"
healthcheck:
test: ["CMD-SHELL", "tailscale status"]
interval: 1s
timeout: 5s
retries: 60
volumes:
- /srv/docker/patrizio/tailscale:/var/lib
- /lib/modules:/lib/modules:ro
devices:
- /dev/net/tun:/dev/net/tun
cap_add:
- net_admin
- sys_module
- net_raw
logging:
driver: "json-file"
options:
mode: "non-blocking"
max-size: "10m"
max-file: "3"