Easy setup of nginx container for reverse proxy and ssl off loading on docker
You should have domain name and routable IP if you want to set up ssl offloading
Build a Dockerfile for that, modify docker-compose.yml, and go to next step.
Fill the blank args in service nginx of nginx.conf and go to Build
...
nginx:
build:
context: .
dockerfile: Dockerfile.nginx
args:
- domain=
- port= # Same as web port
- email=
hostname: nginx
ports:
- "80:80"
- "443:443"
links:
- web
$ docker-compose build
$ docker-compose up