Add a link from nginx to openvpn in docker-compose

I had some trouble getting nginx to reverse-proxy to transmission using my local IP address. The solution in the end was to add a link from the nginx container to the openvpn container. This causes docker-compose to map the name 'openvpn' to the IP address of the actual container at start up.

This would also allow you to include a portable nginx.conf file in the repository that didn't require the user to change anything. Let me know if you would like me to open a second pull request adding a copy of my nginx.conf that works with this.
This commit is contained in:
Trent Summerfield
2016-03-09 19:03:46 +11:00
parent 9a1683f279
commit c6cf9b71db

View File

@@ -14,6 +14,8 @@ openvpn:
nginx: nginx:
image: library/nginx image: library/nginx
links:
- openvpn
ports: ports:
- "8080:8080" - "8080:8080"
volumes: volumes: