This repository has been archived on 2020-05-12. You can view files and clone it, but cannot push or open issues or pull requests.
HPCplaybooks/roles/nginx-proxy/templates/nginx-proxy.service

17 lines
438 B
SYSTEMD
Raw Normal View History

[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