Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/robbertkl/docker-proxy

Reverse proxy for Docker containers with automatic SSL using Let's Encrypt
https://github.com/robbertkl/docker-proxy

Last synced: 22 days ago
JSON representation

Reverse proxy for Docker containers with automatic SSL using Let's Encrypt

Awesome Lists containing this project

README

        

# robbertkl/proxy

Automated reverse proxy for Docker containers. While similar to [jwilder/nginx-proxy](https://github.com/jwilder/nginx-proxy), the main additional feature is fully automated SSL configuration using Let's Encrypt. Each virtual host gets its own SSL certificate, which is automatically renewed periodically.

## Usage

Run like this:

```
docker run -d -e [email protected] -v /var/run/docker.sock:/var/run/docker.sock:ro -p 80:80 -p 443:443 robbertkl/proxy
```

If you'd like to use a custom NGINX configuration template, just bind mount it with `-v :/usr/src/app/nginx.conf.tmpl`.

Run your web containers like this:

```
docker run -d -l proxy.host=example.org,www.example.org
```

For HTTP basic authentication you can bind mount a directory with your password file(s) using `-v :/etc/nginx/htpasswd`. You can then use the label `proxy.auth=` when starting a container to enable HTTP basic authentication for that container.

## Environment variables

For the proxy container:

* `LETSENCRYPT_EMAIL` (e-mail address to use for Let's Encrypt)

## Labels

For your web containers:

* `proxy.host=` (1 or more hostnames, comma-separated)
* `proxy.auth=` (file for HTTP basic authentication, absolute or relative to `/etc/nginx/htpasswd`)

## Authors

* Robbert Klarenbeek,

## License

This repo is published under the [MIT License](http://www.opensource.org/licenses/mit-license.php).