postgrest-docs
postgrest-docs copied to clipboard
Question about Daemonizing
I'm reading the docs on Demonizing.
In the docs it says to create a systemd service file as follows:
[Unit]
Description=REST API for any Postgres database
After=postgresql.service
[Service]
ExecStart=/bin/postgrest /etc/postgrest/config
ExecReload=/bin/kill -SIGUSR1 $MAINPID
[Install]
WantedBy=multi-user.target
Why aren't we told to add a line like
User = postgrest_authenticator_user
in the [Service] section?
That way we would be running postgrest as a different user from root. Wouldn't that be preferable from a security stand point?
The service file was meant to be basic/simple. But sure, a specific user can be recommended. Perhaps mention it as a comment in the file or a note in the docs.
I'll move the issue to docs, would be great if you can contribute a PR with this addition.
The current example for systemd already has a USER= line.