Sources from:
- https://github.com/fatk/docker-letsencrypt-nginx-proxy-companion-examples
- https://github.com/JrCs/docker-letsencrypt-nginx-proxy-companion
- https://github.com/jwilder/nginx-proxy
Clone this repository and run the following commands to add the required network and generating the nginx proxy docker containers
docker network create -d bridge nginx-proxy
docker-compose up -d --build
services:
nginx:
// ...
environment:
VIRTUAL_HOST: 'myhost.url'
VIRTUAL_NETWORK: nginx-proxy
VIRTUAL_PORT: '80'
LETSENCRYPT_HOST: 'myhost.url'
LETSENCRYPT_EMAIL: 'mail@myhost.url'
networks:
- proxy-tier
// ...
networks:
proxy-tier:
external:
name: nginx-proxy
Proxied SSL support example: