docker-compose.yaml 945 B

12345678910111213141516171819202122232425262728293031323334353637
  1. version: '3'
  2. services:
  3. openvpn:
  4. build:
  5. context: .
  6. dockerfile: Dockerfile.openvpn
  7. image: openvpn:local
  8. command: /etc/openvpn/setup/configure.sh
  9. environment:
  10. OVPN_SERVER_NET: "192.168.100.0"
  11. OVPN_SERVER_MASK: "255.255.255.0"
  12. cap_add:
  13. - NET_ADMIN
  14. ports:
  15. - 7777:1194 # for openvpn
  16. - 8080:8080 # for ovpn-admin because of network_mode
  17. volumes:
  18. - ./easyrsa_master:/etc/openvpn/easyrsa
  19. - ./ccd_master:/etc/openvpn/ccd
  20. ovpn-admin:
  21. build:
  22. context: .
  23. image: ovpn-admin:local
  24. command: /app/ovpn-admin
  25. environment:
  26. OVPN_DEBUG: "True"
  27. OVPN_VERBOSE: "True"
  28. OVPN_NETWORK: "192.168.100.0/24"
  29. EASYRSA_PATH: "/mnt/easyrsa"
  30. OVPN_SERVER: "127.0.0.1:7777:tcp"
  31. OVPN_INDEX_PATH: "/mnt/easyrsa/pki/index.txt"
  32. network_mode: service:openvpn
  33. volumes:
  34. - ./easyrsa_master:/mnt/easyrsa
  35. - ./ccd_master:/mnt/ccd