From 38ae5ad2c64a5bd6d3518dc1f1710af85bd2c93d Mon Sep 17 00:00:00 2001 From: Arya Kiran Date: Thu, 19 Jan 2023 12:15:01 +0530 Subject: [PATCH] add example caddyfile and systemd service --- examples/Caddyfile | 6 ++++++ examples/publapi.service | 16 ++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 examples/Caddyfile create mode 100644 examples/publapi.service diff --git a/examples/Caddyfile b/examples/Caddyfile new file mode 100644 index 0000000..c0769c0 --- /dev/null +++ b/examples/Caddyfile @@ -0,0 +1,6 @@ +publapi.yourdomain.tld { + reverse_proxy localhost:3000 + basicauth /signup + admin xxx + } +} diff --git a/examples/publapi.service b/examples/publapi.service new file mode 100644 index 0000000..0b6f69d --- /dev/null +++ b/examples/publapi.service @@ -0,0 +1,16 @@ +[Unit] +Description=API for the Project Segfault Pubnix +After=networking.target +[Service] +WorkingDirectory=/var/publapi +User=publapi +Group=publapi +Environment=PUBLAPI_PORT=3000 +Environment=SHOUTRRR_URL='matrix://user:password@host/' +ExecStart=/var/publapi/publapi +RestartSec=5 +Restart=always +KillMode=mixed + +[Install] +WantedBy=default.target