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.
 
 

27 lines
834 B

  1. [Unit]
  2. Description=Matrix Riot web server
  3. After=docker.service
  4. Requires=docker.service
  5. [Service]
  6. Type=simple
  7. ExecStartPre=-/usr/bin/docker kill matrix-riot-web
  8. ExecStartPre=-/usr/bin/docker rm matrix-riot-web
  9. ExecStart=/usr/bin/docker run --rm --name matrix-riot-web \
  10. --log-driver=none \
  11. --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
  12. -v {{ matrix_riot_web_data_path }}/config.json:/riot-web/webapp/config.json:ro \
  13. -v {{ matrix_riot_web_data_path }}/riot.im.conf:/data/riot.im.conf:ro \
  14. --network={{ matrix_docker_network }} \
  15. {% if not matrix_nginx_proxy_enabled %}
  16. -p 127.0.0.1:8765:8765 \
  17. {% endif %}
  18. {{ matrix_riot_web_docker_image }}
  19. ExecStop=-/usr/bin/docker kill matrix-riot-web
  20. ExecStop=-/usr/bin/docker rm matrix-riot-web
  21. Restart=always
  22. RestartSec=30
  23. [Install]
  24. WantedBy=multi-user.target