-
Notifications
You must be signed in to change notification settings - Fork 21
/
docker-compose.yml
74 lines (71 loc) · 1.98 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
version: '3'
# https://github.com/kylemanna/docker-openvpn/blob/master/docs/docker-compose.md
services:
openvpn:
cap_add:
- NET_ADMIN
container_name: vpn_openvpn
image: kylemanna/openvpn
ports:
- "1194:1194/udp"
- "1194:1194/tcp"
environment:
# - VIRTUAL_PORT=${VIRTUAL_PORT_OPENVPN}
# - VIRTUAL_HOST=${VIRTUAL_HOST_OPENVPN}
# - LETSENCRYPT_HOST=${LETSENCRYPT_HOST_VPN}
# - LETSENCRYPT_EMAIL=${LETSENCRYPT_EMAIL}
# - OPENVPN_PROVIDER=${OPENVPN_PROVIDER}
# - OPENVPN_USERNAME=${OPENVPN_USERNAME}
# - OPENVPN_PASSWORD=${OPENVPN_PASSWORD}
# - LOCAL_NETWORK=192.168.0.0/24
OPENVPN_OPTS: --inactive 3600 --ping 10 --ping-exit 60 -–log-driver json-file --log-opt max-size=10m
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
- ./openvpn_data:/etc/openvpn
restart: always
networks:
vpn-net:
ipv4_address: 172.110.1.3
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
pihole:
image: pihole/pihole
container_name: vpn_pihole
cap_add:
- NET_ADMIN
dns:
- 127.0.0.1
- 1.1.1.1
depends_on:
- openvpn
ports:
#- "553:53/tcp"
#- "553:53/udp"
- "8081:80/tcp"
environment:
WEBPASSWORD: fcvFjLIO2hWhkFCi
# #1 Digitalcourage | #2 Chaos Computer Club
DNS1: 46.182.19.48
DNS2: 213.73.91.35
volumes:
- ./pihole:/etc/pihole
- ./pihole/dnsmasq.d:/etc/dnsmasq.d
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
restart: always
networks:
vpn-net:
ipv4_address: 172.110.1.4
logging:
driver: "json-file"
options:
max-size: "5m"
max-file: "3"
# docker network create --driver=bridge --subnet=172.110.1.0/24 --gateway=172.110.1.1 vpn-net
networks:
vpn-net:
external: true