- Add Tailscale container with hostname 'patrizio' for network connectivity - Configure health check for Tailscale service availability - Make patrizio service depend on healthy Tailscale container - Mount required volumes for Tailscale state and kernel modules - Grant necessary capabilities (net_admin, sys_module, net_raw) for VPN operation - Add internal network configuration for service isolation - Switch patrizio to use published image (ghcr.io/polpetta/patrizio-bot:v0.2.0) - Standardize logging configuration across both services
44 lines
976 B
YAML
44 lines
976 B
YAML
services:
|
|
patrizio:
|
|
image: ghcr.io/polpetta/patrizio-bot:v0.2.0
|
|
restart: unless-stopped
|
|
command: -f /data/ serve
|
|
volumes:
|
|
- ./data:/data:rw
|
|
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
|
|
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
|
|
command: tailscaled
|
|
networks:
|
|
- internal
|
|
logging:
|
|
driver: "json-file"
|
|
options:
|
|
mode: "non-blocking"
|
|
max-size: "10m"
|
|
max-file: "3"
|