This is a super simple nginx setup that is pre-configured to allow for a simple reverse-proxy setup without the need for target services to be running in linked containers.
Just drop this in place of nginx and set the following:
NGINX_PORT - The host listening portNGINX_HOST - The target service you want to reverse-proxy toHOST_HEADER - The host header you want to reverse-proxy withSample docker-compose.yml - This will reverse-proxy http://192.168.0.100:3000 on the host's port 8080:
version: '2'
services:
nginx:
image: laiello/nginx-reverse-proxy
environment:
NGINX_PORT: '8080'
NGINX_HOST: http://192.168.0.100:3000
HOST_HEADER: mydomain.com
stdin_open: true
tty: true
If you need to extend the nginx conf you can volume mount your own like so (copy the one from this repo first):
volumes:
- ./default.conf.template:/etc/nginx/conf.d/default.template
Content type
Image
Digest
Size
42.7 MB
Last updated
over 7 years ago
docker pull laiello/nginx-reverse-proxy