From 55da813dd52d03b24eda1f5f00cced1b3701e483 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Mon, 9 Oct 2023 10:23:22 +0300 Subject: Add hrdp service --- hrdp-channels.scm | 26 ++++++++++++++++++++++++++ run_hrdp-project.sh | 2 ++ shepherd/disabled/hrdp-project.scm | 14 -------------- shepherd/init.d/hrdp-project.scm | 12 ++++++++++++ 4 files changed, 40 insertions(+), 14 deletions(-) create mode 100644 hrdp-channels.scm create mode 100755 run_hrdp-project.sh delete mode 100644 shepherd/disabled/hrdp-project.scm create mode 100644 shepherd/init.d/hrdp-project.scm diff --git a/hrdp-channels.scm b/hrdp-channels.scm new file mode 100644 index 0000000..d7c3bd7 --- /dev/null +++ b/hrdp-channels.scm @@ -0,0 +1,26 @@ +(list + (channel + (name 'gn-bioinformatics) + (url "https://gitlab.com/genenetwork/guix-bioinformatics") + (commit + "0ee8053e002a5b19645c6e34ea3c90d5a65596c7")) + (channel + (name 'guix-past) + (url "https://gitlab.inria.fr/guix-hpc/guix-past") + (commit + "f4770290109789a5409f98b06ce3c848c43be34d") + (introduction + (make-channel-introduction + "0c119db2ea86a389769f4d2b9c6f5c41c027e336" + (openpgp-fingerprint + "3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5")))) + (channel + (name 'guix) + (url "https://git.savannah.gnu.org/git/guix.git") + (commit + "81b31ca8e1bb4c93e8910f1d3e2e0cf3e8435286") + (introduction + (make-channel-introduction + "9edb3f66fd807b096b48283debdcddccfea34bad" + (openpgp-fingerprint + "BBB0 2DDF 2CEA F6A8 0D1D E643 A2A0 6DF2 A33A 54FA"))))) diff --git a/run_hrdp-project.sh b/run_hrdp-project.sh new file mode 100755 index 0000000..916a7a7 --- /dev/null +++ b/run_hrdp-project.sh @@ -0,0 +1,2 @@ +#!/bin/sh +/home/shepherd/guix-profiles/hrdp/bin/guix environment --ad-hoc hrdp-project --with-source=hrdp-project=file:///home/efraimf/hrdp.tar.gz -- sh -c '$GUIX_ENVIRONMENT/main.py' diff --git a/shepherd/disabled/hrdp-project.scm b/shepherd/disabled/hrdp-project.scm deleted file mode 100644 index 54ad53a..0000000 --- a/shepherd/disabled/hrdp-project.scm +++ /dev/null @@ -1,14 +0,0 @@ -(define hrdp-project - (make - #:provides '(hrdp-project) - #:docstring "Run the hrdp-project web server" - #:start (make-forkexec-constructor - '("/var/guix/profiles/per-user/shepherd/current-guix/bin/guix" - "environment" "--ad-hoc" "hrdp-project" "--" - "sh" "-c" "$GUIX_ENVIRONMENT/main.py") - #:log-file "/home/shepherd/logs/hrdp-project.log") - #:stop (make-kill-destructor) - #:respawn? #t)) -(register-services hrdp-project) - -(start hrdp-project) diff --git a/shepherd/init.d/hrdp-project.scm b/shepherd/init.d/hrdp-project.scm new file mode 100644 index 0000000..86b5f21 --- /dev/null +++ b/shepherd/init.d/hrdp-project.scm @@ -0,0 +1,12 @@ +(define hrdp-project + (make + #:provides '(hrdp-project) + #:docstring "Run the hrdp-project web server" + #:start (make-forkexec-constructor + '("/home/shepherd/run_hrdp-project.sh") + #:log-file "/home/shepherd/logs/hrdp-project.log") + #:stop (make-kill-destructor) + #:respawn? #t)) +(register-services hrdp-project) + +(start hrdp-project) -- cgit v1.2.3