Use SyslogIdentifier to improve logging

Reasoning is the same as for matrix-org/synapse#5023.

For us, the journal used to contain `docker` for all services, which
is not very helpful when looking at them all together (`journalctl -f`).
This commit is contained in:
Slavi Pantaleev
2019-05-16 09:41:45 +09:00
parent cf3117011b
commit ae7c8d1524
15 changed files with 37 additions and 2 deletions

View File

@ -8,6 +8,7 @@ Requires=docker.service
Type=simple
ExecStartPre=-/usr/bin/docker stop matrix-postgres
ExecStartPre=-/usr/bin/docker rm matrix-postgres
ExecStart=/usr/bin/docker run --rm --name matrix-postgres \
--log-driver=none \
--user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
@ -23,10 +24,12 @@ ExecStart=/usr/bin/docker run --rm --name matrix-postgres \
{{ arg }} \
{% endfor %}
{{ matrix_postgres_docker_image_to_use }}
ExecStop=-/usr/bin/docker stop matrix-postgres
ExecStop=-/usr/bin/docker rm matrix-postgres
Restart=always
RestartSec=30
SyslogIdentifier=matrix-postgres
[Install]
WantedBy=multi-user.target