6e1c0cdd15
* Add restart for weave service unit * Reuse docker_bin_dir everythere * Limit systemd managed docker containers by CPU/RAM. Do not configure native systemd limits due to the lack of consensus in the kernel community requires out-of-tree kernel patches. Signed-off-by: Bogdan Dobrelya <bdobrelia@mirantis.com>
17 lines
496 B
Django/Jinja
17 lines
496 B
Django/Jinja
[Unit]
|
|
Description=Weave proxy for Docker API
|
|
Documentation=http://docs.weave.works/
|
|
Wants=docker.socket
|
|
After=docker.service docker.socket
|
|
|
|
[Service]
|
|
EnvironmentFile=-/etc/weave.%H.env
|
|
EnvironmentFile=-/etc/weave.env
|
|
ExecStartPre=-{{ docker_bin_dir }}/docker rm -f weaveproxy
|
|
ExecStartPre={{ bin_dir }}/weave launch-proxy $WEAVEPROXY_ARGS
|
|
ExecStart={{ docker_bin_dir }}/docker attach weaveproxy
|
|
Restart=on-failure
|
|
ExecStop={{ bin_dir }}/weave stop-proxy
|
|
|
|
[Install]
|
|
WantedBy=weave-network.target
|