From f79d3a8c46dc66715ad223828c06e5c686c4a12d Mon Sep 17 00:00:00 2001 From: KoCoder Date: Tue, 13 Jan 2026 09:51:11 +0100 Subject: [PATCH] Debian Package Structure --- DEBIAN/control | 8 ++++++++ DEBIAN/postinst | 2 ++ DEBIAN/preinst | 2 ++ etc/systemd/system/alumnihub.service | 20 ++++++++++++++++++++ 4 files changed, 32 insertions(+) create mode 100644 DEBIAN/control create mode 100644 DEBIAN/postinst create mode 100644 DEBIAN/preinst create mode 100644 etc/systemd/system/alumnihub.service diff --git a/DEBIAN/control b/DEBIAN/control new file mode 100644 index 0000000..20157ff --- /dev/null +++ b/DEBIAN/control @@ -0,0 +1,8 @@ +Package: oqtaneabsolventenverein +Version: 1.0 +Architecture: amd64 +Essential: no +Priority: optional +Depends: aspnetcore-runtime-10.0,nginx,postgresql-18 +Maintainer: kocoder +Description: Our production oqtane setup diff --git a/DEBIAN/postinst b/DEBIAN/postinst new file mode 100644 index 0000000..12cd839 --- /dev/null +++ b/DEBIAN/postinst @@ -0,0 +1,2 @@ +#!/bin/bash +systemctl deamon-reload \ No newline at end of file diff --git a/DEBIAN/preinst b/DEBIAN/preinst new file mode 100644 index 0000000..6359ccc --- /dev/null +++ b/DEBIAN/preinst @@ -0,0 +1,2 @@ +#!/bin/bash +useradd oqtane diff --git a/etc/systemd/system/alumnihub.service b/etc/systemd/system/alumnihub.service new file mode 100644 index 0000000..5efc808 --- /dev/null +++ b/etc/systemd/system/alumnihub.service @@ -0,0 +1,20 @@ +[Unit] +Description=Alumnihub Webservice + +[Service] +WorkingDirectory=/opt/oqtane +ExecStart=/usr/bin/dotnet /opt/oqtane/Oqtane.Server.dll +Restart=always +# Restart service after 10 seconds if the dotnet service crashes: +RestartSec=5 +KillSignal=SIGINT +SyslogIdentifier=alumnihub +User=oqtane +Environment=ASPNETCORE_ENVIRONMENT=Production +Environment=ASPNETCORE_URLS="http://127.0.0.1:5000" +Environment=ASPNETCORE_FORWARDEDHEADERS_ENABLED=true +Environment=ASPNETCORE_FORWARDEDHEADERS_PROXIES=127.0.0.1 +Environment=DOTNET_NOLOGO=true + +[Install] +WantedBy=multi-user.target \ No newline at end of file