docker_ssl_endpoint/README.md

39 lines
2.5 KiB
Markdown
Raw Normal View History

2016-04-12 07:02:15 +02:00
# SSL Termination using HAProxy
This image translates between plain http and https using HAProxy.
2016-04-03 09:08:55 +02:00
## How it works
2016-04-12 07:02:15 +02:00
2018-09-28 22:45:45 +02:00
```plain
2016-04-08 07:36:51 +02:00
+-------------+
| |
+----+ |
+--------->+8080| Tomcat |
| +----+ |
| | |
+-------------------------+ | +-------------+
| | |
+---+ | +------------+-+ +-------------+
--->+ 80| | | | | |
+---+ | +---+ docker nginx | +----+ |
2016-12-29 19:09:31 +01:00
| SSL Proxy +----->+ 80| auto proxy +--------> 80| Wordpress |
2016-04-08 07:36:51 +02:00
+---+ | +---+ | +----+ |
--->+443| | | | | |
+---+ | +--+---------+-+ +-------------+
| | | |
+---------+------------+--+ | | +-------------+
| | | | | |
v | | | +-----+ Flask |
+--+-+ | +------+ | +-------->+5000|| |
|Cert| | |Docker| | +-----+ App |
|Data| +-->+Socket+<----+ | |
+----+ +------+ +-------------+
2016-04-03 09:08:55 +02:00
```
The *docker_ssl_endpoint* Container listens on port 443 (expose this port for
public) availability. All secure connections coming in on this port are handled
using the certificates form the *cert data* volume and passed on to the *target*
container's port 80.
## Starting the container
2016-04-08 07:36:51 +02:00
`docker run --name ssl_endpoint -v $PATH_TO_CERT_DATA:/data -v /var/run/docker.sock:/var/run/docker.sock -p $IP:443:443 -p $IP:80:80 -d --link nginx:target docker_ssl_endpoint`