Dev setup for tonyg to run a local S3 proxy
This commit is contained in:
parent
5463a1e922
commit
31627739dd
|
@ -3,17 +3,25 @@
|
|||
(require "../src/main.rkt")
|
||||
(main (hash 'port 8444
|
||||
'reloadable? #t
|
||||
'package-index-url "https://localhost:8444/pkgs-all.json.gz"
|
||||
'package-index-url "file:///home/tonyg/public_html/pkg-index-static/pkgs-all.json.gz"
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; Either:
|
||||
;;
|
||||
'static-output-type 'file
|
||||
'static-content-target-directory (build-path (find-system-path 'home-dir)
|
||||
"public_html/pkg-catalog-static")
|
||||
'static-urlprefix "https://localhost/~tonyg/pkg-catalog-static"
|
||||
;;
|
||||
;; Or:
|
||||
;;
|
||||
;; 'static-output-type 'aws-s3
|
||||
;; 'aws-s3-bucket+path "pkgs.leastfixedpoint.com/"
|
||||
;; ;; These two should be set to an HTTPS proxy (e.g. nginx) proxying to S3,
|
||||
;; ;; http://pkgs.leastfixedpoint.com.s3-website-us-east-1.amazonaws.com
|
||||
;; 'static-urlprefix "https://localhost:8446"
|
||||
;; 'dynamic-static-urlprefix "https://localhost:8446"
|
||||
;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
'static-urlprefix "https://localhost/~tonyg/pkg-catalog-static"
|
||||
'dynamic-urlprefix "https://localhost:8444"
|
||||
'backend-baseurl "https://localhost:8445"
|
||||
'pkg-index-generated-directory (build-path (find-system-path 'home-dir)
|
||||
|
|
30
configs/tonyg/nginx.locals3proxy.conf
Normal file
30
configs/tonyg/nginx.locals3proxy.conf
Normal file
|
@ -0,0 +1,30 @@
|
|||
# As a regular user, run
|
||||
#
|
||||
# nginx -p . -c nginx.locals3proxy.conf
|
||||
|
||||
daemon off;
|
||||
pid ./nginx.pid;
|
||||
error_log locals3proxy-error.log;
|
||||
|
||||
events {
|
||||
worker_connections 768;
|
||||
}
|
||||
|
||||
http {
|
||||
server {
|
||||
listen 8446 default_server ssl;
|
||||
|
||||
access_log locals3proxy-access.log;
|
||||
error_log locals3proxy-error.log;
|
||||
|
||||
ssl_certificate /home/tonyg/src/racket-pkg-website/server-cert.pem;
|
||||
ssl_certificate_key /home/tonyg/src/racket-pkg-website/private-key.pem;
|
||||
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
|
||||
ssl_ciphers HIGH:!aNULL:!MD5;
|
||||
|
||||
location / {
|
||||
proxy_pass http://pkgs.leastfixedpoint.com.s3-website-us-east-1.amazonaws.com/;
|
||||
proxy_http_version 1.1;
|
||||
}
|
||||
}
|
||||
}
|
2
configs/tonyg/run-s3-proxy.sh
Executable file
2
configs/tonyg/run-s3-proxy.sh
Executable file
|
@ -0,0 +1,2 @@
|
|||
#!/bin/sh
|
||||
exec nginx -p . -c nginx.locals3proxy.conf
|
Loading…
Reference in New Issue
Block a user