Reverse-proxy with https support.
- Waits for an upstream by
app
link on1377
port; - Assume that Let's Encrypt has been installed and certs are generated outside container.
# Build
$ sudo docker build \
--build-arg FROM=nginx:alpine
-t SERVER_IMAGE_NAME \
.
# 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