1
0
Fork 0
myserver-configuration/roles/wireguard/templates/docker-compose.yml.j2

58 lines
1.6 KiB
Text
Raw Normal View History

2023-09-24 12:28:25 +02:00
version: '3'
services:
wireguard:
image: lscr.io/linuxserver/wireguard:latest
2023-09-24 18:48:56 +02:00
restart: always
2023-09-24 12:28:25 +02:00
container_name: wireguard
cap_add:
- NET_ADMIN
- SYS_MODULE
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/Paris
- SERVERURL=vpn.mrdev023.fr
- SERVERPORT={{ server.vpn.port }}
- ALLOWEDIPS={{ server.vpn.subnet }}
2023-09-24 18:48:56 +02:00
- PEERDNS={{ server.vpn.dns_ip }}
2023-09-24 12:28:25 +02:00
- PEERS={{ server.vpn.peers }}
- LOG_CONFS=false
volumes:
- {{ server.work_dir }}/wireguard/base:/config
- /lib/modules:/lib/modules
ports:
2023-09-24 16:48:25 +02:00
- {{ server.vpn.port }}:51820/udp
2023-09-24 12:28:25 +02:00
networks:
vpn:
ipv4_address: {{ server.vpn.ip }}
sysctls:
- net.ipv4.conf.all.src_valid_mark=1
2023-09-24 18:48:56 +02:00
adguardhome:
image: adguard/adguardhome:latest
restart: always
container_name: adguardhome
volumes:
- {{ server.work_dir }}/adguardhome/work:/opt/adguardhome/work
- {{ server.work_dir }}/adguardhome/conf:/opt/adguardhome/conf
labels:
- "traefik.enable=true"
- "traefik.http.routers.adguardhome-secure.entrypoints=https"
- "traefik.http.routers.adguardhome-secure.rule=Host(`dns.{{ server.domain }}`)"
- "traefik.http.routers.adguardhome-secure.tls=true"
- "traefik.http.routers.adguardhome-secure.tls.certresolver=sslResolver"
- "traefik.http.routers.adguardhome-secure.middlewares=private-network@file"
- "traefik.port=3000"
- "traefik.docker.network=proxy"
networks:
proxy: {}
vpn:
ipv4_address: {{ server.vpn.dns_ip }}
2023-09-24 12:28:25 +02:00
networks:
2023-09-24 18:48:56 +02:00
proxy:
external: true
2023-09-24 12:28:25 +02:00
vpn:
external: true