Matrix Docker Ansible eploy
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 

40 wiersze
2.0 KiB

  1. #jinja2: lstrip_blocks: "True"
  2. [Unit]
  3. Description=Matrix JWT Service
  4. After=docker.service
  5. Requires=docker.service
  6. [Service]
  7. Type=simple
  8. Environment="HOME={{ devture_systemd_docker_base_systemd_unit_home_path }}"
  9. ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} stop --time={{ devture_systemd_docker_base_container_stop_grace_time_seconds }} matrix-jwt-service 2>/dev/null || true'
  10. ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-jwt-service 2>/dev/null || true'
  11. ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \
  12. --rm \
  13. --name=matrix-jwt-service \
  14. --log-driver=none \
  15. --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
  16. --cap-drop=ALL \
  17. --network={{ matrix_jwt_service_container_network }} \
  18. {% if matrix_jwt_service_container_http_host_bind_port %}
  19. -p {{ matrix_jwt_service_container_http_host_bind_port }}:8080 \
  20. {% endif %}
  21. --env-file={{ matrix_jwt_service_base_path }}/env \
  22. --label-file={{ matrix_jwt_service_base_path }}/labels \
  23. {{ matrix_jwt_service_image }}
  24. {% for network in matrix_jwt_service_container_additional_networks %}
  25. ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} network connect {{ network }} matrix-jwt-service
  26. {% endfor %}
  27. ExecStart={{ devture_systemd_docker_base_host_command_docker }} start --attach matrix-jwt-service
  28. ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} stop --time={{ devture_systemd_docker_base_container_stop_grace_time_seconds }} matrix-jwt-service 2>/dev/null || true'
  29. ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-jwt-service 2>/dev/null || true'
  30. Restart=always
  31. RestartSec=30
  32. SyslogIdentifier=matrix-jwt-service
  33. [Install]
  34. WantedBy=multi-user.target