diff --git a/mollysocket/mollysocket.service b/mollysocket/mollysocket.service new file mode 100644 index 0000000..46bf366 --- /dev/null +++ b/mollysocket/mollysocket.service @@ -0,0 +1,31 @@ +# /etc/systemd/system/mollysocket.service +[Unit] +Description=MollySocket +After=network-online.target + +[Service] +Type=simple +Environment="RUST_LOG=info" +Environment="MOLLY_CONF=/opt/mollysocket/prod.toml" +WorkingDirectory=/opt/mollysocket/ + +SetCredentialEncrypted=ms_vapid: \ + ********************************************************************* \ + ********************************************************************* \ + ************************************** +Environment=MOLLY_VAPID_KEY_FILE=%d/ms_vapid + +User=mollysocket +Group=mollysocket +UMask=0007 + +ExecStart=/opt/mollysocket/ms server +KillSignal=SIGINT + +Restart=on-failure + +# Configures the time to wait before service is stopped forcefully. +TimeoutStopSec=5 + +[Install] +WantedBy=multi-user.target \ No newline at end of file diff --git a/mollysocket/prod.toml b/mollysocket/prod.toml new file mode 100644 index 0000000..bf81393 --- /dev/null +++ b/mollysocket/prod.toml @@ -0,0 +1,5 @@ +db = '/opt/mollysocket/mollysocket.db' +allowed_endpoints = ['https://ntfy.ilnostropianetaselvaggio.it', 'https://up.conversations.im'] +allowed_uuids = ['*'] +webserver = true +port = 8020 \ No newline at end of file