Matrix Docker Ansible eploy
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

39 строки
1.3 KiB

  1. #jinja2: lstrip_blocks: "True"
  2. [Unit]
  3. Description=Matrix Postgres server
  4. After=docker.service
  5. Requires=docker.service
  6. [Service]
  7. Type=simple
  8. ExecStartPre=-{{ matrix_host_command_docker }} stop matrix-postgres
  9. ExecStartPre=-{{ matrix_host_command_docker }} rm matrix-postgres
  10. ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-postgres \
  11. --log-driver=none \
  12. --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
  13. --cap-drop=ALL \
  14. --read-only \
  15. --tmpfs=/tmp:rw,noexec,nosuid,size=100m \
  16. --tmpfs=/run/postgresql:rw,noexec,nosuid,size=100m \
  17. --network={{ matrix_docker_network }} \
  18. {% if matrix_postgres_container_postgres_bind_port %}
  19. -p {{ matrix_postgres_container_postgres_bind_port }}:5432 \
  20. {% endif %}
  21. --env-file={{ matrix_postgres_base_path }}/env-postgres-server \
  22. --mount type=bind,src={{ matrix_postgres_data_path }},dst=/var/lib/postgresql/data \
  23. --mount type=bind,src=/etc/passwd,dst=/etc/passwd,ro \
  24. {% for arg in matrix_postgres_container_extra_arguments %}
  25. {{ arg }} \
  26. {% endfor %}
  27. {{ matrix_postgres_docker_image_to_use }}
  28. ExecStop=-{{ matrix_host_command_docker }} stop matrix-postgres
  29. ExecStop=-{{ matrix_host_command_docker }} rm matrix-postgres
  30. Restart=always
  31. RestartSec=30
  32. SyslogIdentifier=matrix-postgres
  33. [Install]
  34. WantedBy=multi-user.target