container network reverse proxy configuration
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
James Storey cb31821e0d update README 11 months ago
nginx add config files 11 months ago
README.md update README 11 months ago
docker-compose.yml add config files 11 months ago

README.md

WebProxy Container Network

Configuration of a set of containers that provide a host with a http reverse-proxy network

Images used

  1. nginx:latest
  2. jwilder/docker-gen
  3. jrcs/letsencrypt-nginx-proxy-compainion

Usage

make sure to add the webproxy network before running docker-compose up

docker network create webproxy

Setup your containers to connect to the webproxy network

version: '3'
networks:
	default:
		external:
			name: webproxy

Then, add the VIRTUAL_HOST environment variable to hookup the container to the proxy

services:
	my_server:
		image: some-image:latest
		environment:
			VIRTUAL_HOST: host.example.com

Add the LETSENCRYPT_HOST and LETSENCRYPT_EMAIL to enable HTTPS

services:
	my_server:
		image: some-image:latest
		environment:
			VIRTUAL_HOST: host.example.com
			LETSENCRYPT_HOST: host.example.com
			LETSENCRYPT_EMAIL: me@example.com

The proxy will forward traffic to the exposed port in the new image.