diff options
author | Sam Pearson <sam@sgp.me.uk> | 2018-10-02 15:48:42 +0100 |
---|---|---|
committer | Sam Pearson <sam@sgp.me.uk> | 2018-10-03 08:38:04 +0100 |
commit | 52ab1010195bbd92152fb8a2635ca935241c319e (patch) | |
tree | e3c751d97d46227fbdd1e970cfe8f734cd8e7b9c | |
parent | 1991fc6e914a3f11c61358a59322280dee4b90eb (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.
-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 |