aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--genenetwork/services/genenetwork.scm17
-rwxr-xr-xproduction-deploy.sh1
2 files changed, 14 insertions, 4 deletions
diff --git a/genenetwork/services/genenetwork.scm b/genenetwork/services/genenetwork.scm
index 3b39f6c..e7cf9b8 100644
--- a/genenetwork/services/genenetwork.scm
+++ b/genenetwork/services/genenetwork.scm
@@ -109,6 +109,8 @@
(default "/var/empty"))
(gn3-data-directory genenetwork-configuration-gn3-data-directory
(default "/var/genenetwork"))
+ (gn2-sessions-dir genenetwork-configuration-gn2-sessions-dir
+ (default "/var/genenetwork/sessions/genenetwork2"))
(gn2-secrets genenetwork-configuration-gn2-secrets
(default "/etc/genenetwork"))
(gn3-secrets genenetwork-configuration-gn3-secrets
@@ -252,7 +254,7 @@
(define (genenetwork-activation config)
(match-record config <genenetwork-configuration>
- (gn2-secrets gn3-secrets gn-auth-secrets auth-db llm-db-path genotype-files gn-tmpdir gn-doc-git-checkout)
+ (gn2-secrets gn3-secrets gn-auth-secrets auth-db llm-db-path genotype-files gn-tmpdir gn-doc-git-checkout gn2-sessions-dir)
(with-imported-modules '((guix build utils))
#~(begin
(use-modules (guix build utils))
@@ -275,6 +277,8 @@
(find-files #$genotype-files
#:directories? #t)
(find-files #$gn2-secrets
+ #:directories? #t)
+ (find-files #$gn2-sessions-dir
#:directories? #t)))
(for-each (lambda (file)
(chown file
@@ -345,7 +349,7 @@ G-expressions or numbers."
described by @var{config}, a @code{<genenetwork-configuration>}
object."
(match-record config <genenetwork-configuration>
- (genenetwork2 genenetwork3 gn-auth server-name gn-auth-server-name gn2-port gn3-port gn-auth-port sql-uri auth-db xapian-db genotype-files sparql-endpoint gn-sourcecode-directory gn3-data-directory gn2-secrets gn3-secrets gn-auth-secrets llm-db-path gn-tmpdir log-level)
+ (genenetwork2 genenetwork3 gn-auth server-name gn-auth-server-name gn2-port gn3-port gn-auth-port sql-uri auth-db xapian-db genotype-files gn2-sessions-dir sparql-endpoint gn-sourcecode-directory gn3-data-directory gn2-secrets gn3-secrets gn-auth-secrets llm-db-path gn-tmpdir log-level)
;; If we mapped only the mysqld.sock socket file, it would break
;; when the external mysqld server is restarted.
(let* ((database-mapping (file-system-mapping
@@ -369,7 +373,8 @@ object."
("JS_GUIX_PATH" ,(file-append gn2-profile "/share/genenetwork2/javascript"))
("PLINK_COMMAND" ,(file-append gn2-profile "/bin/plink2"))
("SQL_URI" ,sql-uri)
- ("AI_SEARCH_ENABLED" "True")))))
+ ("AI_SEARCH_ENABLED" "True")
+ ("SESSION_FILESYSTEM_CACHE_PATH" ,gn2-sessions-dir)))))
(gn3-profile (profile
(content (package->development-manifest genenetwork3))
(allow-collisions? #t)))
@@ -448,7 +453,11 @@ object."
(writable? #t))
(file-system-mapping
(source gn2-ca-bundle)
- (target source))))
+ (target source))
+ (file-system-mapping
+ (source gn2-sessions-dir)
+ (target source)
+ (writable? #t))))
(extra-cli-arguments
(list "--log-level"
(string-upcase (symbol->string log-level)))))
diff --git a/production-deploy.sh b/production-deploy.sh
index 66f8a1f..a88fcb8 100755
--- a/production-deploy.sh
+++ b/production-deploy.sh
@@ -40,6 +40,7 @@ container_script=$(guix system container \
--share=/export2/guix-containers/genenetwork/tmp=/opt/gn/tmp \
--expose=/export2/guix-containers/genenetwork/data/virtuoso=/export/data/virtuoso/ \
--share=/export2/guix-containers/genenetwork/var/lib/gn-docs=/export/data/gn-docs \
+ --share=/export2/guix-containers/genenetwork/var/genenetwork/sessions=/var/genenetwork/sessions \
production.scm)
echo $container_script