You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
1.0 KiB

  1. [Unit]
  2. Description=etcd-proxy docker wrapper
  3. Wants=docker.socket
  4. After=docker.service
  5. [Service]
  6. User=root
  7. PermissionsStartOnly=true
  8. ExecStart={{ docker_bin_dir | default("/usr/bin") }}/docker run --restart=always \
  9. --env-file=/etc/etcd-proxy.env \
  10. {# TODO(mattymo): Allow docker IP binding and disable in envfile
  11. -p 2380:2380 -p 2379:2379 #}
  12. --net=host \
  13. --stop-signal=SIGKILL \
  14. -v /usr/share/ca-certificates/:/etc/ssl/certs:ro \
  15. --name={{ etcd_proxy_member_name | default("etcd-proxy") }} \
  16. {{ etcd_image_repo }}:{{ etcd_image_tag }} \
  17. {% if etcd_after_v3 %}
  18. {{ etcd_container_bin_dir }}etcd
  19. {% endif %}
  20. ExecStartPre=-{{ docker_bin_dir | default("/usr/bin") }}/docker rm -f {{ etcd_proxy_member_name | default("etcd-proxy") }}
  21. ExecReload={{ docker_bin_dir | default("/usr/bin") }}/docker restart {{ etcd_proxy_member_name | default("etcd-proxy") }}
  22. ExecStop={{ docker_bin_dir | default("/usr/bin") }}/docker stop {{ etcd_proxy_member_name | default("etcd-proxy") }}
  23. Restart=always
  24. RestartSec=15s
  25. [Install]
  26. WantedBy=multi-user.target