about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2024-11-04 10:13:01 -0600
committerFrederick Muriuki Muriithi2024-11-04 10:31:56 -0600
commit04506c4496e5ca8b3bc38e28ed70945a145fb036 (patch)
tree605ba38edefdca4fbd7b6791e505fe9cdd05f125
parentba402e6b12894b846a5adbbc3db54e9e230edf77 (diff)
downloadgn-machines-04506c4496e5ca8b3bc38e28ed70945a145fb036.tar.gz
Define REQUESTS_CA_BUNDLE envvar for python-requests
Define the `REQUESTS_CA_BUNDLE` for all applications that make use of
python's requests library. The library needs to know the location of
valid CA certificates in order to work as expected.
-rw-r--r--genenetwork/services/genenetwork.scm26
1 files changed, 22 insertions, 4 deletions
diff --git a/genenetwork/services/genenetwork.scm b/genenetwork/services/genenetwork.scm
index ec66f64..1ea9ae2 100644
--- a/genenetwork/services/genenetwork.scm
+++ b/genenetwork/services/genenetwork.scm
@@ -349,6 +349,9 @@ object."
                                        ("PLINK_COMMAND" ,(file-append gn2-profile "/bin/plink2"))
                                        ("SQL_URI" ,sql-uri)
                                        ("AI_SEARCH_ENABLED" "True")))))
+           (gn3-profile (profile
+                         (content (package->development-manifest genenetwork3))
+                         (allow-collisions? #t)))
            (gn3-conf (computed-file "gn3.conf"
                                     (configuration-file-gexp
                                      `(("AUTH_DB" ,auth-db)
@@ -360,6 +363,9 @@ object."
                                        ("GENOTYPE_FILES" ,genotype-files)
                                        ("REAPER_COMMAND" ,(file-append gn2-profile "/bin/qtlreaper"))
                                        ("LLM_DB_PATH" ,llm-db-path)))))
+           (gn-auth-profile (profile
+                         (content (package->development-manifest gn-auth))
+                         (allow-collisions? #t)))
            (gn-auth-conf (computed-file "gn-auth.conf"
                                         (configuration-file-gexp
                                          `(("GN_AUTH_SECRETS" ,(string-append gn-auth-secrets "/gn-auth-secrets.py"))
@@ -387,7 +393,10 @@ object."
                      (value gn2-conf))
                     (environment-variable
                      (name "HOME")
-                     (value "/tmp"))))
+                     (value "/tmp"))
+                    (environment-variable
+                     (name "REQUESTS_CA_BUNDLE")
+                     (value (file-append gn2-profile "/etc/ssl/certs/ca-certificates.crt")))))
              (mappings (list database-mapping
                              (file-system-mapping
                               (source genotype-files)
@@ -435,7 +444,10 @@ object."
                      (value gn3-secrets))
                     (environment-variable
                      (name "HOME")
-                     (value "/tmp"))))
+                     (value "/tmp"))
+                    (environment-variable
+                     (name "REQUESTS_CA_BUNDLE")
+                     (value (file-append gn3-profile "/etc/ssl/certs/ca-certificates.crt")))))
              (mappings (list database-mapping
                              (file-system-mapping
                               (source gn3-conf)
@@ -482,7 +494,10 @@ object."
                      (value "/tmp"))
                     (environment-variable
                      (name "AUTHLIB_INSECURE_TRANSPORT")
-                     (value "true"))))
+                     (value "true"))
+                    (environment-variable
+                     (name "REQUESTS_CA_BUNDLE")
+                     (value (file-append gn-auth-profile "/etc/ssl/certs/ca-certificates.crt")))))
              (mappings (list database-mapping
                              (file-system-mapping
                               (source gn-auth-conf)
@@ -630,7 +645,10 @@ a @code{<genenetwork-configuration>} record."
                      (value "/tmp"))
                     (environment-variable
                      (name "GN_UPLOADER_ENVIRONMENT")
-                     (value gn-uploader-profile))))
+                     (value gn-uploader-profile))
+                    (environment-variable
+                     (name "REQUESTS_CA_BUNDLE")
+                     (value (file-append gn-uploader-profile "/etc/ssl/certs/ca-certificates.crt")))))
              (mappings (list database-mapping
                              (file-system-mapping
                               (source gn-uploader-conf)