~jan0sch/smederee

Showing details for patch dc792985a86d5af2b2bfd9cfc7a946e612634d29.
2023-09-27 (Wed), 12:29 PM - Jens Grassel - dc792985a86d5af2b2bfd9cfc7a946e612634d29

Packaging: Naming, path adjustments and systemd example script.

Summary of changes
1 files added
  • modules/hub/src/universal/conf/smederee-hub.service.sample
1 files modified with 6 lines added and 6 lines removed
  • build.sbt with 6 added and 6 removed lines
diff -rN -u old-smederee/build.sbt new-smederee/build.sbt
--- old-smederee/build.sbt	2025-01-14 22:46:06.268452066 +0000
+++ new-smederee/build.sbt	2025-01-14 22:46:06.268452066 +0000
@@ -144,7 +144,7 @@
     )
     .settings(commonSettings)
     .settings(
-      name := "hub",
+      name := "smederee-hub",
       buildInfoKeys := Seq[BuildInfoKey](name, version, scalaVersion),
       buildInfoPackage := "de.smederee.hub",
       libraryDependencies ++= Seq(
@@ -201,7 +201,7 @@
         daemonGroup := "smederee",
         Debian / debianPackageProvides += "smederee-hub",
         Debian / debianPackageDependencies += "openjdk-17-jre-headless",
-        defaultLinuxInstallLocation := "/opt",
+        defaultLinuxInstallLocation := "/usr/local/share",
         maintainer := "Wegtam GmbH <devops@wegtam.com>",
         rpmLicense := Option("AGPL-3.0 or later"),
         rpmVendor := "Wegtam GmbH <devops@wegtam.com>",
@@ -229,7 +229,7 @@
         ),
         packageSummary := "Smederee Hub Service - Software collaboration platform.",
         packageDescription := "Leverage the power of the darcs vcs to handle your projects with ease and confidence, this is the central hub service",
-        Debian / requiredStartFacilities := Option("$local_fs $remote_fs $network $postgresql"),
+        //Debian / requiredStartFacilities := Option("$local_fs $remote_fs $network $postgresql"),
         // Do not package API docs.
         Compile / packageDoc / publishArtifact := false,
         Compile / doc / sources := Seq.empty,
@@ -295,7 +295,7 @@
     )
     .settings(commonSettings)
     .settings(
-      name := "tickets",
+      name := "smederee-tickets",
       buildInfoKeys := Seq[BuildInfoKey](name, version, scalaVersion),
       buildInfoPackage := "de.smederee.tickets",
       libraryDependencies ++= Seq(
@@ -348,7 +348,7 @@
         daemonGroup := "smederee",
         Debian / debianPackageProvides += "smederee-tickets",
         Debian / debianPackageDependencies += "openjdk-17-jre-headless",
-        defaultLinuxInstallLocation := "/opt",
+        defaultLinuxInstallLocation := "/usr/local/share",
         maintainer := "Wegtam GmbH <devops@wegtam.com>",
         rpmLicense := Option("AGPL-3.0 or later"),
         rpmVendor := "Wegtam GmbH <devops@wegtam.com>",
@@ -376,7 +376,7 @@
         ),
         packageSummary := "Smederee Ticket Service - Software collaboration platform.",
         packageDescription := "Leverage the power of the darcs vcs to handle your projects with ease and confidence, this is the ticket service",
-        Debian / requiredStartFacilities := Option("$local_fs $remote_fs $network $postgresql"),
+        //Debian / requiredStartFacilities := Option("$local_fs $remote_fs $network $postgresql"),
         // Do not package API docs.
         Compile / packageDoc / publishArtifact := false,
         Compile / doc / sources := Seq.empty,
diff -rN -u old-smederee/modules/hub/src/universal/conf/smederee-hub.service.sample new-smederee/modules/hub/src/universal/conf/smederee-hub.service.sample
--- old-smederee/modules/hub/src/universal/conf/smederee-hub.service.sample	1970-01-01 00:00:00.000000000 +0000
+++ new-smederee/modules/hub/src/universal/conf/smederee-hub.service.sample	2025-01-14 22:46:06.268452066 +0000
@@ -0,0 +1,23 @@
+[Unit]
+Description=Smederee Hub Service - Software collaboration platform.
+Requires=network.target
+
+[Service]
+Type=simple
+WorkingDirectory=/usr/local/share/smederee-hub
+EnvironmentFile=/etc/default/smederee-hub
+ExecStart=/usr/local/share/smederee-hub/bin/hub
+ExecReload=/bin/kill -HUP $MAINPID
+Restart=always
+RestartSec=60
+SuccessExitStatus=
+TimeoutStopSec=5
+User=smederee
+ExecStartPre=/bin/mkdir -p /run/hub
+ExecStartPre=/bin/chown smederee:smederee /run/hub
+ExecStartPre=/bin/chmod 755 /run/hub
+PermissionsStartOnly=true
+LimitNOFILE=1024
+
+[Install]
+WantedBy=multi-user.target