Public Repository

Last pushed: 18 days ago
Short Description
Full Description

NOTE:
This image is intended to be used with nfqlt/docker vagrant box and other nfqlt docker images.
Other use scenarios might work but are not tested yet.

Proxy

Info

This is general purpose proxy for use as a front entry point and distribute
requests according to subdomains

Limitations

SSL/TLS (https) connections are not supported

Configuration

This image is based on nginx and exposes port 80

NFQ_PROXY_MAP

Provide space separated lists of map entries. Map entry consists of
nginx server_name pattern and container name to redirect
request to separated by a colon :

example:
docker run -it -e NFQ_PROXY_MAP='*:website app.*:backend cdn.*:media' <this_image>

default values is empty.

Sample configuration

The following configuration forwards cdn.my.project.dev to media container,
backend.my.project.dev to backend container and every other subdomain
to website cotainer.

web:
  image: nfqlt/proxy
  links:
    - website
    - backend
    - media
  environment:
    NFQ_PROXY_MAP: >
      *:website
      backend.*:backend
      cdn.*:media:80


website:
  image: nfqlt/apache24-php56
  environment:
    APACHE_DOCUMENTROOT: /home/project/src/web
  volumes:
    - ./:/home/project/src/web:ro


backend:
  image: nfqlt/apache24-php56
  environment:
    APACHE_DOCUMENTROOT: /home/project/src/web
  volumes:
    - ./:/home/project/src/web:ro


media:
  image: nfqlt/apache24-php56
  environment:
    APACHE_DOCUMENTROOT: /home/project/src/web
  volumes:
    - ./:/home/project/src/web:ro

Docker Pull Command
Owner
nfqlt