diff options
-rw-r--r-- | CHANGELOG.md | 1 | ||||
m--------- | commonlib | 0 | ||||
-rw-r--r-- | conf/systemd.example | 21 |
3 files changed, 22 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 24b439127..b5e85417f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,7 @@ - Move away from FastCGI in sample conf/sysvinit config. - Customised Vagrant box available, with an override option. - Add Dockerfile and example Docker Compose setup. + - Add a sample systemd unit file for the Catalyst application server. * v2.4 (6th September 2018) - Security diff --git a/commonlib b/commonlib -Subproject 26a6eb8570abc8bd4cb10ecf1c961abd0cd671e +Subproject 311a29848f6326152a292c2ab6c9adfcd3efee3 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 |