Matrix Docker Ansible eploy
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.
 
 

32 lines
1.0 KiB

  1. [Unit]
  2. Description=Matrix Corporal
  3. After=docker.service
  4. Requires=docker.service
  5. Requires=matrix-synapse.service
  6. After=matrix-synapse.service
  7. [Service]
  8. Type=simple
  9. ExecStartPre=-/usr/bin/docker kill matrix-corporal
  10. ExecStartPre=-/usr/bin/docker rm matrix-corporal
  11. ExecStart=/usr/bin/docker run --rm --name matrix-corporal \
  12. --log-driver=none \
  13. --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
  14. --network={{ matrix_docker_network }} \
  15. {% if not matrix_nginx_proxy_enabled %}
  16. -p 127.0.0.1:41080:41080 \
  17. -p 127.0.0.1:41081:41081 \
  18. {% endif %}
  19. -v {{ matrix_corporal_config_dir_path }}:/etc/matrix-corporal:ro \
  20. -v {{ matrix_corporal_cache_dir_path }}:/var/cache/matrix-corporal:rw \
  21. -v {{ matrix_corporal_var_dir_path }}:/var/matrix-corporal:rw \
  22. {{ matrix_corporal_docker_image }} \
  23. /matrix-corporal -config=/etc/matrix-corporal/config.json
  24. ExecStop=-/usr/bin/docker kill matrix-corporal
  25. ExecStop=-/usr/bin/docker rm matrix-corporal
  26. Restart=always
  27. RestartSec=30
  28. [Install]
  29. WantedBy=multi-user.target