add systemd-Unit

This commit is contained in:
rubo77 2017-05-13 18:09:14 +02:00
parent 7b41d3fa59
commit 803a5d9dff
2 changed files with 16 additions and 0 deletions

View file

@ -265,6 +265,8 @@ als root laufen. Generell lässt sich der Server wie folgt starten:
```
$FFFFNG_HOME/node_modules/.bin/ffffng -c $FFFFNG_HOME/config.json
```
Ein Beispiel für eine systemd-Unit liegt unter `assets/ffffng.service`. In dem Beispiel läuft der Server unter dem
User `fastdform`.
Der Server ist dann via HTTP unter dem in der `config.json` konfigurierten Port erreichbar. Für vhost-Konfiguration und
HTTPs biete es sich an, nginx o.ä. als Proxy zu verwenden.

14
assets/ffffng.service Normal file
View file

@ -0,0 +1,14 @@
# systemd init script: /etc/systemd/system/ffffng.service
[Service]
ExecStart=/home/fastdform/node_modules/.bin/ffffng -c /home/fastdform/config.json
Restart=always
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=ffffng
User=fastdform
Group=fastdform
Environment=NODE_ENV=production
[Install]
WantedBy=multi-user.target