Skip to content

Commit

Permalink
Example systemd service unit file
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
sagepe committed Oct 3, 2018
1 parent 1991fc6 commit 52ab101
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion commonlib
Submodule commonlib updated from 26a6eb to 311a29
21 changes: 21 additions & 0 deletions conf/systemd.example
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 52ab101

Please sign in to comment.