MagicDNS is broken in the container (DNS proxy returns SERVFAIL with 'no upstream resolvers set'). Use extra_hosts as a reliable workaround to ensure ollama.lan.poldebra.me resolves to its Tailscale IP 100.64.0.7 instead of the server's public IP which has an expired cert.
54 lines
1.3 KiB
YAML
54 lines
1.3 KiB
YAML
services:
|
|
patrizio:
|
|
image: ghcr.io/polpetta/patrizio-bot:v0.2.0
|
|
network_mode: service:tailscale
|
|
restart: unless-stopped
|
|
extra_hosts:
|
|
- "ollama.lan.poldebra.me:100.64.0.7"
|
|
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
|
|
dns:
|
|
- 100.100.100.100
|
|
env_file:
|
|
- tailscale.env
|
|
command: >
|
|
sh -c "tailscaled --netfilter-mode=off &
|
|
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"
|