Skip to content

Instantly share code, notes, and snippets.

@costa
Created August 10, 2021 12:57
Show Gist options
  • Save costa/a9f9af8953590bfd10cdb85ff56cee0d to your computer and use it in GitHub Desktop.
Save costa/a9f9af8953590bfd10cdb85ff56cee0d to your computer and use it in GitHub Desktop.
Sample Docker Compose configuration for "staging" web interface access with OpenVPN
version: '3.4'
services:
open-vpn:
image: dperson/openvpn-client
cap_add:
- net_admin
devices:
- /dev/net/tun
dns: 8.8.4.4 # NOTE not sure how to make this generic
command: -d -a "$OVPN_USER;$OVPN_OTP"
ports:
- 80
volumes:
- "$OVPN_CONF_DIR:/vpn"
some.internal-web.app:
depends_on:
- open-vpn
image: nginx
network_mode: service:open-vpn
volumes:
- ./nginx/conf.d/default.conf:/etc/nginx/conf.d/default.conf:ro
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment