diff options
author | pjotrp | 2020-01-14 02:47:54 -0600 |
---|---|---|
committer | pjotrp | 2020-01-14 02:47:54 -0600 |
commit | 0632c2211ec17c24e1cb86342a9f0f0f86c0f78a (patch) | |
tree | 9d6e6a7bc3b50871ec867fc2525070c8cff9b749 /gn/services/bnw-container.scm | |
parent | 92c6388e645e48f44f1856616df09aab8c29a9aa (diff) | |
parent | fc7386366195a3270e928cd09f9d3576c0771663 (diff) | |
download | guix-bioinformatics-0632c2211ec17c24e1cb86342a9f0f0f86c0f78a.tar.gz |
Merge commit 'fc7386366195a3270e928cd09f9d3576c0771663' of gitlab.com:genenetwork/guix-bioinformatics
Diffstat (limited to 'gn/services/bnw-container.scm')
-rw-r--r-- | gn/services/bnw-container.scm | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/gn/services/bnw-container.scm b/gn/services/bnw-container.scm index 2e5e521..8463a75 100644 --- a/gn/services/bnw-container.scm +++ b/gn/services/bnw-container.scm @@ -13,7 +13,7 @@ (package bnw-configuration-package ; package (default bnw)) (deploy-directory bnw-deploy-directory ; string - (default "/home/bnw/server")) + (default "/srv/http")) (port bnw-configuration-port ; list of strings (default '("8880")))) @@ -23,11 +23,12 @@ #~(begin (use-modules (guix build utils)) (when (directory-exists? #$deploy-directory) - (delete-file-recusively #$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) - (system* #$(file-append coreutils "/bin/chmod") "a+w" - (string-append #$deploy-directory "/sourcecodes/data")))))) + (invoke #$(file-append coreutils "/bin/chmod") "a+w" + (string-append #$deploy-directory "/sourcecodes/data")))))) (define bnw-nginx-config (match-lambda @@ -37,7 +38,7 @@ (server-name '("Bayesian Network")) (listen port) ;(root package) - (root "/srv/http") + (root deploy-directory) (locations (list (nginx-php-location) @@ -74,13 +75,14 @@ (bootloader grub-bootloader) (target "does-not-matter"))) (file-systems %base-file-systems) - ;; No firmware for VMs + ;; No firmware for VMs. (firmware '()) + ;; We don't need any packages inside the container. + (packages '()) (services (list (service dhcp-client-service-type) (service bnw-service-type ;; The following is for testing: ;(bnw-configuration - ; (deploy-directory "/home/efraimf/bnw") ; (port '("8888"))) )))) |