Files
wireguard-vps-tunnel/docker-compose.server.yml
Deploy Bot dcebf21e03
Some checks failed
Build and Push Docker Images / Сборка сервера (multi-arch) (push) Has been cancelled
Build and Push Docker Images / Сборка клиента (multi-arch) (push) Has been cancelled
fix: restart-safe entrypoints, remove obsolete compose version
- Add wg0 interface cleanup before startup (prevents 'already exists' crash)
- Always regenerate wg0.conf to pick up key changes
- Remove obsolete 'version' from docker-compose files
- Fix read-only /proc/sys writes (host-level ip_forward already set)
2026-07-30 00:30:18 +01:00

38 lines
1.3 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# =============================================================================
# docker-compose.server.yml — VPS (сервер с публичным IP)
# Запуск: docker compose -f docker-compose.server.yml up -d
# =============================================================================
services:
wireguard-server:
image: git.softuniq.eu/opendoor/wireguard-vps-tunnel-server:latest
build:
context: ./server
platforms:
- linux/amd64
- linux/arm64
container_name: wireguard-server
restart: unless-stopped
cap_add:
- NET_ADMIN
- SYS_MODULE
network_mode: host
volumes:
- ./config:/etc/wireguard
- /lib/modules:/lib/modules:ro
environment:
- SERVER_WG_IP=${SERVER_WG_IP:-10.0.0.1}
- SERVER_WG_PORT=${SERVER_WG_PORT:-51820}
- CLIENT_PUBLIC_KEY=${CLIENT_PUBLIC_KEY:?Укажите CLIENT_PUBLIC_KEY в .env}
- CLIENT_WG_IP=${CLIENT_WG_IP:-10.0.0.2}
- FORWARD_PORTS=${FORWARD_PORTS:-80,443}
- SERVER_PUBLIC_IP=${SERVER_PUBLIC_IP:-}
- SERVER_PUBLIC_IFACE=${SERVER_PUBLIC_IFACE:-}
ports:
- "${SERVER_WG_PORT:-51820}:51820/udp"
healthcheck:
test: ["CMD", "/healthcheck.sh"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s