-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
53 lines (51 loc) · 1.62 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: "wireguard"
services:
traefik:
container_name: traefik
image: traefik:latest
restart: always
ports:
- "80:80"
- "443:443"
- ${SERVERPORT}:${SERVERPORT}/udp
environment:
DO_AUTH_TOKEN: ${DO_AUTH_TOKEN}
labels:
- "traefik.http.routers.traefik.rule=Host(`traefik.${HELIOS_DOMAIN}`)"
- "traefik.http.routers.traefik.entrypoints=websecure"
- "traefik.http.routers.traefik.tls.certresolver=myresolver"
- "traefik.http.routers.traefik.service=api@internal"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./compose/traefik/traefik.yml:/etc/traefik/traefik.yml
- ./compose/traefik/dynamic_conf.yml:/etc/traefik/dynamic_conf.yml
wireguard:
image: lscr.io/linuxserver/wireguard:latest
container_name: wireguard
cap_add:
- NET_ADMIN
- SYS_MODULE
environment:
- PUID=1000
- PGID=1000
- TZ=Etc/GMT+3
- SERVERURL=${HELIOS_AGENT_DOMAIN}
- SERVERPORT=${SERVERPORT}
- PEERS=${PEERS}
- PEERDNS=auto
- INTERNAL_SUBNET=${INTERNAL_SUBNET}
- ALLOWEDIPS=0.0.0.0/0
- PERSISTENTKEEPALIVE_PEERS=20
- LOG_CONFS=false
volumes:
- /lib/modules:/lib/modules
ports:
- ${SERVERPORT}:${SERVERPORT}/udp
sysctls:
- net.ipv4.conf.all.src_valid_mark=1
restart: always
labels:
- "traefik.udp.routers.wireguard.rule=HostSNI(`HELIOS_AGENT_DOMAIN`)"
- "traefik.udp.routers.wireguard.entrypoints=udp"
- "traefik.udp.routers.wireguard.tls.certresolver=myresolver"
- "traefik.udp.services.wireguard.loadbalancer.server.port=${SERVERPORT}"