summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/face_daemon.service27
1 files changed, 27 insertions, 0 deletions
diff --git a/config/face_daemon.service b/config/face_daemon.service
new file mode 100644
index 0000000..4babccc
--- /dev/null
+++ b/config/face_daemon.service
@@ -0,0 +1,27 @@
+[Unit]
+Description=Albumen face detection daemon
+After=network.target albumen.service
+Wants=albumen.service
+
+[Service]
+Type=simple
+User=albumen
+Group=albumen
+WorkingDirectory=/opt/albumen
+
+Environment=MEDIA_ROOT=/var/albumen
+Environment=CONFIG_PATH=/opt/albumen/config.yml
+Environment=LOG_PATH=/opt/albumen/log/albumen.log
+Environment=VENV_PYTHON=/opt/albumen/venv/bin/python3
+Environment=FACES_SCRIPT=/opt/albumen/scripts/faces.py
+
+ExecStart=/usr/bin/ruby /opt/albumen/scripts/face_daemon.rb
+Restart=on-failure
+RestartSec=30
+
+StandardOutput=journal
+StandardError=journal
+SyslogIdentifier=albumen-faces
+
+[Install]
+WantedBy=multi-user.target