Matrix Docker Ansible eploy
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 

40 řádky
1.3 KiB

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