Skip to content

Latest commit

 

History

History

reverse-proxy

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

reverse-proxy

Reverse-proxy with https support.

Prerequisites

  • Waits for an upstream by app link on 1377 port;
  • Assume that Let's Encrypt has been installed and certs are generated outside container.

Build it

# Build
$ sudo docker build \
  --build-arg FROM=nginx:alpine
  -t SERVER_IMAGE_NAME \
  .

Use it

# run application image
$ docker run \
  -p EXTERNAL_PORT:INTERNAL_PORT \
  -v absolute/path/to/secret/config/:/usr/share/nginx/html/config \
  --name RUNNING_IMAGE_NAME \
  -d APP_IMAGE_NAME

# copy configuration files to the folder they should be managed from
$ cp -r ./include.v/* PATH_TO_SECRETS

# preparations
$ chmod +x ./build.sh && ./build.sh

$ chmod +x ./run.sh && ./run.sh
# run contains preconfigured `docker run`:
# $ docker run \
#   --link RUNNING_IMAGE_NAME:app \
#   -d PROXY_IMAGE_NAME

Links

Refs