Add an nginx proxy service with consul template with the objective of
consolidating all the voltha web UIs on a single port on the host.
This update includes the first UI, portainer. Additional UIs will be
added in subsequent updates. The configuration files are currently
mounted into the container. This is temporary to simplify the
development and addition of other UIs to the proxy configuration. Once
all UIs have been added, the configuration will be copied into the
container.
Change-Id: I218c486b56a627995981489602ab44ae0edf0930
diff --git a/nginx_config/conf.d/default.conf b/nginx_config/conf.d/default.conf
new file mode 100644
index 0000000..ca3c2c3
--- /dev/null
+++ b/nginx_config/conf.d/default.conf
@@ -0,0 +1,45 @@
+#server {
+ #listen 80;
+ #server_name localhost;
+
+ #charset koi8-r;
+ #access_log /var/log/nginx/log/host.access.log main;
+
+ #location / {
+ # root /usr/share/nginx/html;
+ # index index.html index.htm;
+ #}
+
+ #error_page 404 /404.html;
+
+ # redirect server error pages to the static page /50x.html
+ #
+ #error_page 500 502 503 504 /50x.html;
+ #location = /50x.html {
+ # root /usr/share/nginx/html;
+ #}
+
+ # proxy the PHP scripts to Apache listening on 127.0.0.1:80
+ #
+ #location ~ \.php$ {
+ # proxy_pass http://127.0.0.1;
+ #}
+
+ # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
+ #
+ #location ~ \.php$ {
+ # root html;
+ # fastcgi_pass 127.0.0.1:9000;
+ # fastcgi_index index.php;
+ # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
+ # include fastcgi_params;
+ #}
+
+ # deny access to .htaccess files, if Apache's document root
+ # concurs with nginx's one
+ #
+ #location ~ /\.ht {
+ # deny all;
+ #}
+#}
+
diff --git a/nginx_config/conf.d/services.conf b/nginx_config/conf.d/services.conf
new file mode 100644
index 0000000..30416e0
--- /dev/null
+++ b/nginx_config/conf.d/services.conf
@@ -0,0 +1,16 @@
+log_format upstreamlog
+ '$remote_addr - $remote_user [$time_local] '
+ '"$request" $status $bytes_sent '
+ '"$http_referer" "$http_user_agent" '
+ '$upstream_addr $upstream_response_time ';
+
+server {
+ listen 80;
+ server_name _;
+
+ access_log /var/log/nginx/access.log upstreamlog;
+
+ include includes/*.conf;
+}
+
+include upstreams/*.conf;