From 0d551870499c886f900a5b87b2040db25e9a00cc Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Mon, 1 Apr 2024 01:59:51 -0500 Subject: fallback: have gn2 and gn3 share a source directory so we can update/debug source code for development. See topics/systems/debug-and-developing-code-with-genenetwork-system-container.gmi --- fallback-deploy.sh | 1 + fallback.scm | 1 + genenetwork/services/genenetwork.scm | 12 +++++++++++- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/fallback-deploy.sh b/fallback-deploy.sh index 782ccb7..6e2e9e9 100755 --- a/fallback-deploy.sh +++ b/fallback-deploy.sh @@ -40,6 +40,7 @@ container_script=$(guix system container \ --share=/export/data/genenetwork-sqlite \ --expose=/export/data/genenetwork/genotype_files \ --share=/var/run/mysqld=/run/mysqld \ + --share=/export/source/fallback-debug \ fallback.scm) name=/usr/local/bin/fallback-system-container diff --git a/fallback.scm b/fallback.scm index 72a83df..bbf3c0d 100644 --- a/fallback.scm +++ b/fallback.scm @@ -65,5 +65,6 @@ (xapian-db "/export/data/genenetwork-xapian") (genotype-files "/export/data/genenetwork/genotype_files") (sparql-endpoint "http://localhost:8892/sparql") + (gn-sourcecode-directory "/export/source/fallback-debug") (gn3-data-directory "/export/data/genenetwork"))) %base-services))) diff --git a/genenetwork/services/genenetwork.scm b/genenetwork/services/genenetwork.scm index 5e97454..0fc2fae 100644 --- a/genenetwork/services/genenetwork.scm +++ b/genenetwork/services/genenetwork.scm @@ -47,6 +47,7 @@ genenetwork-configuration-xapian-db genenetwork-configuration-genotype-files genenetwork-configuration-sparql-endpoint + genenetwork-configuration-gn-sourcecode-directory genenetwork-configuration-gn3-data-directory genenetwork-configuration-gn2-secrets genenetwork-configuration-gn3-secrets @@ -86,6 +87,8 @@ (default "/var/genenetwork/genotype-files")) (sparql-endpoint genenetwork-configuration-sparql-endpoint (default "http://localhost:8081/sparql")) + (gn-sourcecode-directory genenetwork-configuration-gn-sourcecode-directory + (default "/var/empty")) (gn3-data-directory genenetwork-configuration-gn3-data-directory (default "/var/genenetwork")) (gn2-secrets genenetwork-configuration-gn2-secrets @@ -180,7 +183,7 @@ G-expressions or numbers." described by @var{config}, a @code{} object." (match-record config - (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 gn3-data-directory gn2-secrets gn3-secrets gn-auth-secrets) + (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) ;; 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 @@ -207,6 +210,7 @@ object." (configuration-file-gexp `(("AUTH_DB" ,auth-db) ("DATA_DIR" ,gn3-data-directory) + ("SOURCE_DIR" ,gn-sourcecode-directory) ("SPARQL_ENDPOINT" ,sparql-endpoint) ("SQL_URI" ,sql-uri) ("XAPIAN_DB_PATH" ,xapian-db))))) @@ -236,6 +240,9 @@ object." (file-system-mapping (source genotype-files) (target source)) + (file-system-mapping + (source gn-sourcecode-directory) + (target source)) (file-system-mapping (source gn2-conf) (target source)) @@ -273,6 +280,9 @@ object." (file-system-mapping (source gn3-secrets) (target source)) + (file-system-mapping + (source gn-sourcecode-directory) + (target source)) (file-system-mapping (source gn3-data-directory) (target source)) -- cgit v1.2.3