aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2024-10-28 11:39:14 -0500
committerFrederick Muriuki Muriithi2024-11-04 10:05:59 -0600
commite098494158ded439b361fa11d7eb8368aeca668a (patch)
tree6c6af3860580af34c82d8358860c27799e4af494
parent46a1c4c8d01198799e6ac3b99998dca40d2c7094 (diff)
downloadgn-machines-e098494158ded439b361fa11d7eb8368aeca668a.tar.gz
Setup public sparql endpoint in container.
-rw-r--r--genenetwork/services/genenetwork.scm13
1 files changed, 12 insertions, 1 deletions
diff --git a/genenetwork/services/genenetwork.scm b/genenetwork/services/genenetwork.scm
index 6905686..16c5a4f 100644
--- a/genenetwork/services/genenetwork.scm
+++ b/genenetwork/services/genenetwork.scm
@@ -42,6 +42,7 @@
#:use-module (forge socket)
#:use-module (srfi srfi-1)
#:use-module (ice-9 match)
+ #:use-module (web uri)
#:export (genenetwork-service-type
genenetwork-configuration
genenetwork-configuration?
@@ -99,6 +100,8 @@
(default "/var/genenetwork/genotype-files"))
(sparql-endpoint genenetwork-configuration-sparql-endpoint
(default "http://localhost:8081/sparql"))
+ (sparql-server-name genenetwork-configuration-sparql-server-name
+ (default "sparql.genenetwork.org"))
(gn-sourcecode-directory genenetwork-configuration-gn-sourcecode-directory
(default "/var/empty"))
(gn3-data-directory genenetwork-configuration-gn3-data-directory
@@ -471,7 +474,7 @@ object."
reverse proxies for the genenetwork service described by @var{config},
a @code{<genenetwork-configuration>} record."
(match-record config <genenetwork-configuration>
- (server-name gn-auth-server-name gn2-port gn3-port gn-auth-port gn3-alias-server-port)
+ (server-name gn-auth-server-name gn2-port gn3-port gn-auth-port gn3-alias-server-port sparql-endpoint sparql-server-name)
(list (nginx-server-configuration
(server-name (list server-name))
(locations
@@ -504,6 +507,14 @@ a @code{<genenetwork-configuration>} record."
(uri "/")
(body (list (string-append "proxy_pass http://localhost:"
(number->string gn-auth-port) ";")
+ "proxy_set_header Host $host;"))))))
+ (nginx-server-configuration
+ (server-name (list sparql-server-name))
+ (locations
+ (list (nginx-location-configuration
+ (uri "/")
+ (body (list (string-append "proxy_pass http://localhost:"
+ (number->string (uri-port (string->uri sparql-endpoint))) ";")
"proxy_set_header Host $host;")))))))))
(define (genenetwork-mcron-jobs config)