Added VPN service to list of docker containers

This commit is contained in:
2025-05-04 17:09:07 +01:00
parent b2cf51838e
commit 49b1cd26f4
4 changed files with 88 additions and 0 deletions

25
VPN/docker-compose.yml Normal file
View File

@ -0,0 +1,25 @@
version: "3.8"
services:
dockovpn:
image: alekslitvinenk/openvpn
cap_add:
- NET_ADMIN
ports:
- 1194:1194/udp # Expose tcp if you defined HOST_TUN_PROTOCOL=tcp
environment:
HOST_ADDR: vpn.luke-else.co.uk # Your VPN server address
volumes:
- ./openvpn_conf:/opt/Dockovpn_data
labels:
## Expose vpn Through Trefik ##
- "traefik.enable=true" # <== Enable traefik to proxy this container
- "traefik.http.middlewares.redirect-web-secure.redirectscheme.scheme=https"
- "traefik.http.routers.vpn-insecure.middlewares=redirect-web-secure"
- "traefik.http.routers.vpn-insecure.rule=Host(`vpn.luke-else.co.uk`)"
- "traefik.http.routers.vpn-insecure.entrypoints=web"
- "traefik.http.routers.vpn.rule=Host(`vpn.luke-else.co.uk`)"
- "traefik.http.routers.vpn.entrypoints=websecure"
- "traefik.http.routers.vpn.tls.certresolver=myresolver"
restart: always