From f82ba23c5d7228dfe3bac6e5796351774f550922 Mon Sep 17 00:00:00 2001 From: Reimar Date: Thu, 15 Aug 2024 14:50:00 +0200 Subject: [PATCH] Add systemd services used in prod --- API/skantravels.service | 16 ++++++++++++++++ rust-backend/skantravels-rust.service | 14 ++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 API/skantravels.service create mode 100644 rust-backend/skantravels-rust.service diff --git a/API/skantravels.service b/API/skantravels.service new file mode 100644 index 0000000..1ca9378 --- /dev/null +++ b/API/skantravels.service @@ -0,0 +1,16 @@ +[Unit] +Description=Skantravels .NET +After=network.target + +[Service] +Environment=DOTNET_ROOT=/home/reimar/.dotnet +Environment=PATH=$PATH:/home/reimar/.dotnet +Environment=DEFAULT_CONNECTION="Data Source=/home/reimar/skantravels/database.sqlite3" +ExecStartPre=/home/reimar/skantravels/efbundle +ExecStart=/home/reimar/skantravels/API --urls=http://0.0.0.0:5001 +Type=simple + +[Install] +WantedBy=multi-user.target +RequiredBy=network.target + diff --git a/rust-backend/skantravels-rust.service b/rust-backend/skantravels-rust.service new file mode 100644 index 0000000..29dc22f --- /dev/null +++ b/rust-backend/skantravels-rust.service @@ -0,0 +1,14 @@ +[Unit] +Description=Skantravels Rust +After=network.target + +[Service] +Environment=RUST_BACKEND_PORT=5002 +Environment=RUST_BACKEND_DB=/home/reimar/skantravels/database-rust.sqlite3 +ExecStart=/home/reimar/skantravels/skantravels +Type=simple + +[Install] +WantedBy=multi-user.target +RequiredBy=network.target +