aboutsummaryrefslogtreecommitdiffstats
path: root/conf
diff options
context:
space:
mode:
authorSam Pearson <sam@sgp.me.uk>2018-10-02 15:48:42 +0100
committerSam Pearson <sam@sgp.me.uk>2018-10-03 08:38:04 +0100
commit52ab1010195bbd92152fb8a2635ca935241c319e (patch)
treee3c751d97d46227fbdd1e970cfe8f734cd8e7b9c /conf
parent1991fc6e914a3f11c61358a59322280dee4b90eb (diff)
Example systemd service unit file
This adds a systemd service unit file for managing the FixMyStreet Catalyst process manager. This also updates the commonlib submodule with matching changes to our install scripts.
Diffstat (limited to 'conf')
-rw-r--r--conf/systemd.example21
1 files changed, 21 insertions, 0 deletions
diff --git a/conf/systemd.example b/conf/systemd.example
new file mode 100644
index 000000000..1f8edf13c
--- /dev/null
+++ b/conf/systemd.example
@@ -0,0 +1,21 @@
+[Unit]
+Description=FixMyStreet Catalyst Application Server
+Documentation=https://fixmystreet.org/
+After=network.target
+
+[Service]
+Type=forking
+User=fms
+PIDFile=/var/www/fixmystreet/fixmystreet.pid
+ExecStartPre=mkdir /var/www/fixmystreet/logs
+ExecStart=/var/www/fixmystreet/fixmystreet/script/server \
+ --port 9000 \
+ --env deployment \
+ --daemonize \
+ --pid /var/www/fixmystreet/fixmystreet.pid \
+ --access-log /var/www/fixmystreet/logs/fixmystreet.access.log \
+ --error-log /var/www/fixmystreet/logs/fixmystreet.error.log
+ExecStop=kill -TERM $MAINPID
+
+[Install]
+WantedBy=multi-user.target