Sign inSign up

laiello/nginx-reverse-proxy

By laiello

Updated over 7 years ago

Image
0

5.5K

laiello/nginx-reverse-proxy repository overview

Nginx Reverse Proxy

nginx-latest mit

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.

Usage

Just drop this in place of nginx and set the following:

  • Env NGINX_PORT - The host listening port
  • Env NGINX_HOST - The target service you want to reverse-proxy to
  • Env HOST_HEADER - The host header you want to reverse-proxy with

Sample 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

Tag summary

Content type

Image

Digest

Size

42.7 MB

Last updated

over 7 years ago

docker pull laiello/nginx-reverse-proxy