summaryrefslogtreecommitdiffstats
path: root/docker/storperf-httpfrontend
diff options
context:
space:
mode:
Diffstat (limited to 'docker/storperf-httpfrontend')
-rw-r--r--docker/storperf-httpfrontend/html/index.html14
-rw-r--r--docker/storperf-httpfrontend/nginx.conf44
2 files changed, 58 insertions, 0 deletions
diff --git a/docker/storperf-httpfrontend/html/index.html b/docker/storperf-httpfrontend/html/index.html
new file mode 100644
index 0000000..7c772a0
--- /dev/null
+++ b/docker/storperf-httpfrontend/html/index.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+<title>
+StorPerf Home
+</title>
+<body>
+<h1>StorPerf</h1>
+<ul>
+ <li><a href="/swagger">Interactive API</a></li>
+ <li><a href="/graphite">Graphite</a></li>
+ <li><a href="/reporting">Reporting</a></li>
+</ul>
+</body>
+</html> \ No newline at end of file
diff --git a/docker/storperf-httpfrontend/nginx.conf b/docker/storperf-httpfrontend/nginx.conf
new file mode 100644
index 0000000..d655aee
--- /dev/null
+++ b/docker/storperf-httpfrontend/nginx.conf
@@ -0,0 +1,44 @@
+http {
+ include mime.types;
+ default_type application/octet-stream;
+ sendfile on;
+ keepalive_timeout 65;
+ proxy_send_timeout 600;
+ proxy_read_timeout 600;
+ send_timeout 600;
+
+ map $args $containsurl {
+ default 0;
+ "~(^|&)url=[^&]+($|&)" 1;
+ }
+
+ server {
+ listen 5000;
+
+ location /api/ {
+ proxy_pass http://storperf-master:5000;
+ proxy_set_header Host $host:$proxy_port;
+ }
+
+ location /graphite/ {
+ proxy_pass http://storperf-master:8000;
+ proxy_set_header Host $host:$proxy_port;
+ }
+
+ location /reporting/ {
+ proxy_pass http://storperf-reporting:5000/;
+ proxy_set_header Host $host:$proxy_port;
+ }
+
+ location /swagger/ {
+ if ($containsurl = 0) {
+ return 302 $scheme://$host:$server_port$uri?url=http://$host:$server_port/api/spec.json$args;
+ }
+ proxy_pass http://storperf-swaggerui:80/;
+ }
+ }
+}
+
+events {
+ worker_connections 1024;
+}