41 lines
965 B
YAML
41 lines
965 B
YAML
version: "3.0"
|
|
|
|
networks:
|
|
network:
|
|
driver: bridge
|
|
ipam:
|
|
config:
|
|
- subnet: 172.20.0.0/24
|
|
|
|
services:
|
|
wireguard:
|
|
build: .
|
|
image: wg-docker/alpine:0.0.1
|
|
container_name: wg_docker_container
|
|
hostname: wg_docker_container
|
|
restart: unless-stopped
|
|
networks:
|
|
network:
|
|
ipv4_address: 172.20.0.10
|
|
ports:
|
|
- 51820:51820/udp
|
|
environment:
|
|
- PUID=1000
|
|
- PGID=1000
|
|
- TZ=Europe/London
|
|
cap_add:
|
|
- NET_ADMIN
|
|
- SYS_MODULE
|
|
sysctls:
|
|
- net.ipv6.conf.all.disable_ipv6=0
|
|
- net.ipv4.conf.all.src_valid_mark=1
|
|
volumes:
|
|
- /lib/modules:/lib/modules
|
|
- /run/sshd:/run/sshd
|
|
- ./authorized_keys:/root/.ssh/authorized_keys
|
|
- /etc/wireguard/wg0.conf:/etc/wireguard/wg0.conf
|
|
- /etc/wireguard/mullvad:/etc/wireguard/mullvad
|
|
- ./rotate.sh:/usr/bin/rotate.sh
|
|
healthcheck:
|
|
test: [ "CMD", "/usr/bin/rotate.sh" ]
|
|
interval: 24h
|