|
|
|
@ -13,8 +13,8 @@ DefaultDependencies=no
|
|
|
|
|
[Service]
|
|
|
|
|
Type=simple
|
|
|
|
|
Environment="HOME={{ devture_systemd_docker_base_systemd_unit_home_path }}"
|
|
|
|
|
ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} kill matrix-nginx-proxy 2>/dev/null || true'
|
|
|
|
|
ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-nginx-proxy 2>/dev/null || true'
|
|
|
|
|
ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} kill matrix-nginx-proxy 2>/dev/null || true'
|
|
|
|
|
ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-nginx-proxy 2>/dev/null || true'
|
|
|
|
|
|
|
|
|
|
ExecStart={{ devture_systemd_docker_base_host_command_docker }} run --rm --name matrix-nginx-proxy \
|
|
|
|
|
--log-driver=none \
|
|
|
|
@ -51,11 +51,11 @@ ExecStart={{ devture_systemd_docker_base_host_command_docker }} run --rm --name
|
|
|
|
|
{{ matrix_nginx_proxy_docker_image }}
|
|
|
|
|
|
|
|
|
|
{% for network in matrix_nginx_proxy_container_additional_networks %}
|
|
|
|
|
ExecStartPost={{ matrix_host_command_sh }} -c 'attempt=0; while [ $attempt -le 29 ]; do attempt=$(( $attempt + 1 )); if [ "`docker inspect -f {{ '{{.State.Running}}' }} matrix-nginx-proxy 2> /dev/null`" = "true" ]; then break; fi; sleep 1; done; {{ devture_systemd_docker_base_host_command_docker }} network connect {{ network }} matrix-nginx-proxy'
|
|
|
|
|
ExecStartPost={{ devture_systemd_docker_base_host_command_sh }} -c 'attempt=0; while [ $attempt -le 29 ]; do attempt=$(( $attempt + 1 )); if [ "`docker inspect -f {{ '{{.State.Running}}' }} matrix-nginx-proxy 2> /dev/null`" = "true" ]; then break; fi; sleep 1; done; {{ devture_systemd_docker_base_host_command_docker }} network connect {{ network }} matrix-nginx-proxy'
|
|
|
|
|
{% endfor %}
|
|
|
|
|
|
|
|
|
|
ExecStop=-{{ matrix_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} kill matrix-nginx-proxy 2>/dev/null || true'
|
|
|
|
|
ExecStop=-{{ matrix_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-nginx-proxy 2>/dev/null || true'
|
|
|
|
|
ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} kill matrix-nginx-proxy 2>/dev/null || true'
|
|
|
|
|
ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-nginx-proxy 2>/dev/null || true'
|
|
|
|
|
ExecReload={{ devture_systemd_docker_base_host_command_docker }} exec matrix-nginx-proxy /usr/sbin/nginx -s reload
|
|
|
|
|
Restart=always
|
|
|
|
|
RestartSec=30
|
|
|
|
|