dokk.service 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. # Usage:
  2. # ------
  3. #
  4. # 1. Place this file under /etc/systemd/system/
  5. # 2. Adjust the paths and other settings below if necessary
  6. # 3. Activate using: sudo systemctl enable dokk.service
  7. [Unit]
  8. Description=DOKK wsgi server
  9. After=network.target
  10. [Service]
  11. # Edit environment variables to match your installation
  12. # Environment=VAR1=...
  13. # Environment=VAR2=...
  14. # Edit to match your installation
  15. ExecStart=/srv/dokk/venv/bin/gunicorn --config /srv/dokk/gunicorn.py dokk:application
  16. # Run as user "dokk"
  17. User=dokk
  18. Group=dokk
  19. # If set to on-abort, the service will be restarted only if the service process
  20. # exits due to an uncaught signal not specified as a clean exit status. If set
  21. # to on-watchdog, the service will be restarted only if the watchdog timeout
  22. # for the service expires. If set to always, the service will be restarted
  23. # regardless of whether it exited cleanly or not, got terminated abnormally by
  24. # a signal, or hit a timeout.
  25. Restart=always
  26. # Configures the time to sleep before restarting a service (as configured with
  27. # Restart=). Takes a unit-less value in seconds, or a time span value such as
  28. # "5min 20s". Defaults to 100ms.
  29. RestartSec=1
  30. # Takes a list of exit status definitions that, when returned by the main service
  31. # process, will be considered successful termination, in addition to the normal
  32. # successful exit code 0 and the signals SIGHUP, SIGINT, SIGTERM, and SIGPIPE.
  33. # SuccessExitStatus=
  34. ### By default, the service logs to journalctl only.
  35. ### If additional logging to a file is required, uncomment the following three lines
  36. # StandardOutput=syslog
  37. # StandardError=syslog
  38. # SyslogIdentifier=dokk
  39. ### This logs to syslog. If, e.g., rsyslogd is used, you can provide a file
  40. ### /etc/rsyslog.d/dokk.conf, consisting of the following two lines (uncommented)
  41. ### if $programname == 'dokk' then /var/log/dokk/stderrout.log
  42. ### if $programname == 'dokk' then stop
  43. [Install]
  44. WantedBy=multi-user.target