dendrite/docs/systemd/SYSTEMD.md
dymattic b25380f39d - added polylith-example@.service to docs
- added SYSTEMD.md to docs/systemd and moved systemd Part from INSTALL.md
- small fixes in script
2020-10-21 10:47:21 +02:00

1.2 KiB

Systemd setup and usage

Manual install

  • Edit docs/systemd/*.service and copy the file to /etc/systemd/system/
  • Reload systemd: systemctl daemon-reload

Monolith:

  • Enable the service with: systemctl enable monolith-example.service
  • Start the service: systemctl start monolith-example.service

Polylith:

  • Enable the services with: systemctl enable polylith-example@<server>.service (repeat for each server)
  • Start the services: systemctl start polylith-example@*.service

Scripted install (Polylith)

In order to run the whole polylith deployment daemonized with Systemd the following script can set them up for you (root-privileges required):

# ./install-polylith-systemd-units.sh

Example:

# ./install-polylith-systemd-units.sh -u dendrite -d /home/dendrite/server/ all
  • user: dendrite
  • path: /opt/dendrite/
  • selection: all

How to start a specific service (e.g clientapi):

# systemctl start dendrite@clientapi

...or all services using a wildcard:

# systemctl start dendrite@*

Monitor with journalctl:

# journalctl -fu dendrite@clientapi

or

# journalctl -fu dendrite@*