diff --git a/systemd/morffix-worker.service b/systemd/morffix-worker.service new file mode 100644 index 0000000..be423a2 --- /dev/null +++ b/systemd/morffix-worker.service @@ -0,0 +1,18 @@ +[Unit] +Description=morffix worker +ConditionPathExists=/opt/morffix/morffix +After=network.target +Wants=morffix.service + +[Service] +Type=simple +User=root +LimitNOFILE=1024 +Restart=on-failure +RestartSec=10 +StartLimitIntervalSec=60 +WorkingDirectory=/opt/morffix +ExecStart=/opt/morffix/morffix + +[Install] +WantedBy=multi-user.target \ No newline at end of file diff --git a/systemd/morffix.service b/systemd/morffix.service new file mode 100644 index 0000000..72c7d43 --- /dev/null +++ b/systemd/morffix.service @@ -0,0 +1,19 @@ +[Unit] +Description=morffix +ConditionPathExists=/opt/morffix/morffix +After=network.target +Wants=postgresql@15-main.service + +[Service] +Type=simple +User=root +Group=media_library +LimitNOFILE=1024 +Restart=on-failure +RestartSec=10 +StartLimitIntervalSec=60 +WorkingDirectory=/opt/morffix +ExecStart=/opt/morffix/morffix -server + +[Install] +WantedBy=multi-user.target \ No newline at end of file