1
0
forked from HPC/HPCplaybooks

Added role for jwilder nginx proxy.

This is useful when you want to handle ssl or when you want to proxy
multiple containers on a single host.
This commit is contained in:
Egon Rijpkema
2018-02-13 10:07:24 +01:00
parent 4b91b61b66
commit 593082f710
4 changed files with 67 additions and 0 deletions

View File

@ -0,0 +1,16 @@
[Unit]
Description=nginx reverse proxy for docker containers.
After=docker.service
Requires=docker.service
[Service]
TimeoutStartSec=0
Restart=always
ExecStartPre=-/usr/bin/docker kill %n
ExecStartPre=-/usr/bin/docker rm %n
ExecStart=/usr/bin/docker run --name %n \
--rm -d -p 80:80 -p 443:443 -v /srv/certs:/etc/nginx/certs \
-v /var/run/docker.sock:/tmp/docker.sock:ro jwilder/nginx-proxy
[Install]
WantedBy=multi-user.target