diff options
Diffstat (limited to 'gn/services')
-rw-r--r-- | gn/services/archive-pubmed.service | 13 | ||||
-rw-r--r-- | gn/services/archive-pubmed.timer | 9 | ||||
-rw-r--r-- | gn/services/bnw-README | 4 | ||||
-rw-r--r-- | gn/services/bnw-container.scm | 4 | ||||
-rw-r--r-- | gn/services/bnw.service | 2 | ||||
-rw-r--r-- | gn/services/genenetwork.scm | 26 |
6 files changed, 38 insertions, 20 deletions
diff --git a/gn/services/archive-pubmed.service b/gn/services/archive-pubmed.service new file mode 100644 index 0000000..fd00b71 --- /dev/null +++ b/gn/services/archive-pubmed.service @@ -0,0 +1,13 @@ +[Unit] +Description=Download PubMed Archives +After=network-online.target +Wants=network-online.target +AssertPathExists=/export2/PubMed + +[Service] +ExecStart=/usr/local/guix-profiles/ratspub/bin/archive-pubmed +Environment="EDIRECT_PUBMED_MASTER=/export2/PubMed" "PERL_LWP_SSL_CA_FILE=/etc/ssl/certs/ca-certificates.crt" "PATH=/usr/local/guix-profiles/ratspub/bin:/usr/sbin:/usr/bin:/sbin:/bin:/sbin:/usr/sbin" +User=hchen + +[Install] +WantedBy=multi-user.target diff --git a/gn/services/archive-pubmed.timer b/gn/services/archive-pubmed.timer new file mode 100644 index 0000000..4bb27ba --- /dev/null +++ b/gn/services/archive-pubmed.timer @@ -0,0 +1,9 @@ +[Unit] +Description=Daily PubMed downloads + +[Timer] +OnBootSec=5h +OnUnitInactiveSec=15h + +[Install] +WantedBy=default.target diff --git a/gn/services/bnw-README b/gn/services/bnw-README index ab7de53..d70b7fc 100644 --- a/gn/services/bnw-README +++ b/gn/services/bnw-README @@ -6,8 +6,8 @@ $ cd guix-bioinformatics && git pull # systemctl enable --now bnw.service for testing changes to the container, you'll want to do the following (or thereabouts): -$ guix system container gn/services/GN1-container.scm --share=/home/bnw/server=/srv/http --network -$ sudo -E $(guix system container gn/services/GN1-container.scm --share=/home/bnw/server=/srv/http --network) +$ guix system container gn/servicebnwN1-container.scm --network +$ sudo -E $(guix system container gn/services/bnw-container.scm --network) for running the service: see included bnw.service diff --git a/gn/services/bnw-container.scm b/gn/services/bnw-container.scm index 8463a75..39da38d 100644 --- a/gn/services/bnw-container.scm +++ b/gn/services/bnw-container.scm @@ -21,10 +21,6 @@ (match-lambda (($ <bnw-configuration> package deploy-directory port) #~(begin - (use-modules (guix build utils)) - (when (directory-exists? #$deploy-directory) - ;; Not 'delete-file-recursively' because the directory might be empty. - (system* "rm" "-r" #$(string-append deploy-directory "/*"))) (mkdir-p #$deploy-directory) (copy-recursively #$package #$deploy-directory) (invoke #$(file-append coreutils "/bin/chmod") "a+w" diff --git a/gn/services/bnw.service b/gn/services/bnw.service index 5ba8f3f..6ac99a1 100644 --- a/gn/services/bnw.service +++ b/gn/services/bnw.service @@ -3,7 +3,7 @@ Description=BNW web server Wants=guix-daemon.service [Service] -Environment="BNW_COMMAND=$(/bin/su -l bnw -c '/var/guix/profiles/per-user/bnw/current-guix/bin/guix system container /home/bnw/guix-bioinformatics/gn/services/bnw-container.scm --share=/home/bnw/server=/srv/http --share=/home/bnw/server/var-log=/var/log --network')" +Environment="BNW_COMMAND=$(/bin/su -l bnw -c '/var/guix/profiles/per-user/bnw/current-guix/bin/guix system container /home/bnw/guix-bioinformatics/gn/services/bnw-container.scm --share=/home/bnw/server/var-log=/var/log --network')" ExecStart=/bin/bash -c '${BNW_COMMAND}' [Install] diff --git a/gn/services/genenetwork.scm b/gn/services/genenetwork.scm index 0978cd2..4693152 100644 --- a/gn/services/genenetwork.scm +++ b/gn/services/genenetwork.scm @@ -2,13 +2,13 @@ (use-modules (gnu) (gn packages genenetwork) - (gn packages python) + (gn packages python24) (gn packages web)) (use-service-modules web) (use-package-modules python) (define %mod-python-path - (file-append mod-python "/lib/python2.7/site-packages")) + (file-append mod-python "/lib/python2.4/site-packages")) (operating-system (host-name "genenetwork") @@ -22,15 +22,15 @@ ;; No firmware for VMs (firmware '()) - (packages (cons* python-2 + (packages (cons* python-2.4 mod-python - python2-qtlreaper - python2-htmlgen-gn - python2-json-GN1 - python2-piddle - python2-pyx-GN1 - python2-pyxlwriter - python2-svg-GN1 + python24-qtlreaper + ;python24-htmlgen-gn + python24-json-GN1 + python24-piddle + python24-pyx-GN1 + python24-pyxlwriter + python24-svg-GN1 %base-packages)) (services (list (service httpd-service-type @@ -38,7 +38,7 @@ (config (httpd-config-file (server-name "www.genenetwork.org") - (document-root (file-append genenetwork "/web")) + (document-root (file-append genenetwork1 "/web")) (listen '("8811")) (modules (cons* (httpd-module @@ -46,8 +46,8 @@ (file (file-append mod-python "/modules/mod_python.so"))) %default-httpd-modules)) (extra-config (list "\ -PythonPath \"sys.path+['" %mod-python-path "', '" (file-append genenetwork "/web/webqtl") "']\" -<Directory " (file-append genenetwork "/web/webqtl") "> +PythonPath \"sys.path+['" %mod-python-path "', '" (file-append genenetwork1 "/web/webqtl") "']\" +<Directory " (file-append genenetwork1 "/web/webqtl") "> SetHandler python-program PythonHandler mod_python.publisher PythonAutoReload Off |