Created
August 10, 2021 12:57
-
-
Save costa/a9f9af8953590bfd10cdb85ff56cee0d to your computer and use it in GitHub Desktop.
Sample Docker Compose configuration for "staging" web interface access with OpenVPN
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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