- Add missing packages to requirements.txt: requests, beautifulsoup4, fake-useragent, yt-dlp, urllib3 - Fix entrypoint.sh: replace grep -oP (GNU) with awk (BusyBox compat) - Fix entrypoint.sh: add policy routing so LAN clients get responses via eth0 instead of through the WireGuard tunnel - Change healthcheck from ping to curl (VPN provider blocks ICMP) - Add start_period and increase retries for healthcheck - Change external port mapping to 2000:8000 - Add podman-compose.prod.yml and push.sh to version control
55 lines
1.4 KiB
YAML
55 lines
1.4 KiB
YAML
# Production compose — pulls pre-built images from Gitea registry.
|
|
#
|
|
# Usage:
|
|
# podman login git.lpl-mind.de
|
|
# podman-compose -f podman-compose.prod.yml pull
|
|
# podman-compose -f podman-compose.prod.yml up -d
|
|
#
|
|
# Required files:
|
|
# - wg0.conf (WireGuard configuration in the same directory)
|
|
|
|
services:
|
|
vpn:
|
|
image: git.lpl-mind.de/lukas.pupkalipinski/aniworld/vpn:latest
|
|
container_name: vpn-wireguard
|
|
cap_add:
|
|
- NET_ADMIN
|
|
- SYS_MODULE
|
|
sysctls:
|
|
- net.ipv4.ip_forward=1
|
|
- net.ipv4.conf.all.src_valid_mark=1
|
|
volumes:
|
|
- /server/server_aniworld/wg0.conf:/etc/wireguard/wg0.conf:ro
|
|
- /lib/modules:/lib/modules:ro
|
|
ports:
|
|
- "2000:8000"
|
|
environment:
|
|
- HEALTH_CHECK_INTERVAL=10
|
|
- HEALTH_CHECK_HOST=1.1.1.1
|
|
- LOCAL_PORTS=8000
|
|
- PUID=1013
|
|
- PGID=1001
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-sf", "--max-time", "5", "http://1.1.1.1"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 5
|
|
start_period: 60s
|
|
|
|
app:
|
|
image: git.lpl-mind.de/lukas.pupkalipinski/aniworld/app:latest
|
|
container_name: aniworld-app
|
|
network_mode: "service:vpn"
|
|
depends_on:
|
|
vpn:
|
|
condition: service_healthy
|
|
environment:
|
|
- PYTHONUNBUFFERED=1
|
|
- PUID=1013
|
|
- PGID=1001
|
|
volumes:
|
|
- /server/server_aniworld/data:/app/data
|
|
- /server/server_aniworld/logs:/app/logs
|
|
restart: unless-stopped
|