diff options
| author | Frederick Muriuki Muriithi | 2026-03-03 12:11:40 -0600 |
|---|---|---|
| committer | Frederick Muriuki Muriithi | 2026-03-05 08:48:29 -0600 |
| commit | 9a8702b8c59982c266030d8a87d98f51c5378f2c (patch) | |
| tree | e8ece8d669a01a325c0b1eace7d99f7276310924 | |
| parent | d2211919f5562d97692cafafbbdec42aa02ea301 (diff) | |
| download | gn-machines-9a8702b8c59982c266030d8a87d98f51c5378f2c.tar.gz | |
gn-guile: Disambiguate the working dir from the "remote" repo.
The assumption (before this commit) was that the bare/remote repository from which we'd clone the working repository was exposed to the container as a directory. The parent of that directory doubled as the working directory for the application. This conflation of purposes is wrong, and leads to problems, since the remote repo could be a URL/URI to an external service. This commit explicitly defines the working directory.
| -rw-r--r-- | genenetwork/services/genenetwork.scm | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/genenetwork/services/genenetwork.scm b/genenetwork/services/genenetwork.scm index 33bdc3a..e8696d4 100644 --- a/genenetwork/services/genenetwork.scm +++ b/genenetwork/services/genenetwork.scm @@ -126,6 +126,8 @@ (default "/opt/home/gn-guile/.ssh/id_ed25519")) (gn-guile-known-hosts-file genenetwork-configuration-gn-guile-known-hosts-file (default "/opt/home/gn-guile/.ssh/known_hosts")) + (gn-guile-working-dir genenetwork-configuration-gn-guile-working-dir + (default "/export/data")) (gn-doc-git-checkout genenetwork-configuration-gn-doc-git-checkout (default "/export/data/gn-docs")) (gn-docs-working-branch genenetwork-configuration-gn-docs-working-branch @@ -297,7 +299,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-sessions-dir gn-guile-ssh-identity-file) + (gn2-secrets gn3-secrets gn-auth-secrets auth-db llm-db-path genotype-files gn-tmpdir gn-guile-working-dir gn2-sessions-dir gn-guile-ssh-identity-file) (with-imported-modules '((guix build utils)) #~(begin (use-modules (guix build utils)) @@ -360,7 +362,7 @@ (chown file (passwd:uid (getpw "genenetwork")) (passwd:gid (getpw "genenetwork")))) - (append (find-files #$(dirname gn-doc-git-checkout) + (append (find-files #$gn-guile-working-dir #:directories? #t) (find-files #$(dirname (dirname gn-guile-ssh-identity-file)) #:directories? #t))))))) @@ -691,7 +693,7 @@ a @code{<genenetwork-configuration>} record." (define (gn-guile-shepherd-service config) (match-record config <genenetwork-configuration> - (gn-guile gn-doc-git-checkout gn-guile-port gn-guile-ssh-identity-file gn-guile-known-hosts-file gn-docs-working-branch) + (gn-guile gn-doc-git-checkout gn-guile-port gn-guile-ssh-identity-file gn-guile-known-hosts-file gn-docs-working-branch gn-guile-working-dir) (shepherd-service (documentation "Run gn-guile server.") (provision '(gn-guile)) @@ -725,11 +727,11 @@ a @code{<genenetwork-configuration>} record." (program-file "gn-guile" (gn-guile-gexp gn-guile-port gn-guile gn-doc-git-checkout ssh-command gn-docs-working-branch)) #:name "gn-guile-pola-wrapper" - #:directory (dirname gn-doc-git-checkout) + #:directory gn-guile-working-dir #:preserved-environment-variables (map first gn-guile-settings) #:mappings (list (file-system-mapping - (source (dirname gn-doc-git-checkout)) + (source gn-guile-working-dir) (target source) (writable? #t)) (file-system-mapping |
