From ca502bb2ef202e77db4bca0294b6ddfd994f4fe3 Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Tue, 2 Aug 2016 19:14:48 -0400 Subject: [PATCH] Draft live config --- configs/live.rkt | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/configs/live.rkt b/configs/live.rkt index b20681e..29932f2 100644 --- a/configs/live.rkt +++ b/configs/live.rkt @@ -1,4 +1,38 @@ #lang racket/base ;; Default configuration; should be suitable for live deployment. (require "../src/main.rkt") -(main) +(define var (getenv "PKGSERVER_DATADIR")) +(main (hash 'port 8444 + 'reloadable? #t + 'var-path var + 'package-index-url + (format "file://~a/public_html/pkg-index-static/pkgs-all.json.gz" var) + 'backend-baseurl "https://localhost:9004" + 'pkg-index-generated-directory (build-path var "public_html/pkg-index-static") + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + ;; To configure a split, S3-based setup, comment out the following lines: + ;; + ;; 'static-output-type 'file + ;; 'static-content-target-directory (build-path var "public_html/pkg-catalog-static") + ;; 'static-urlprefix "" + ;; 'dynamic-urlprefix "/catalog" + ;; + ;; ... and uncomment and adjust these instead: + ;; + + 'static-output-type 'aws-s3 + 'aws-s3-bucket+path "pkgn.racket-lang.org/" + 'static-urlprefix "http://pkgn.racket-lang.org" + 'dynamic-urlprefix "https://pkgd.racket-lang.org" + + ;; 'static-output-type 'aws-s3 + ;; 'aws-s3-bucket+path "pkgs.leastfixedpoint.com/" + ;; 'static-urlprefix "http://pkgs.leastfixedpoint.com.s3-website-us-east-1.amazonaws.com" + ;; 'dynamic-urlprefix "https://localhost:8444" + + ;; + ;; Make sure to *include* a slash at the end of + ;; aws-s3-bucket+path, and to *exclude* a slash from the + ;; end of both static-urlprefix and dynamic-urlprefix. + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + ))