summaryrefslogtreecommitdiffstats
path: root/cvp/docker
diff options
context:
space:
mode:
authorgrakiss <grakiss.wanglei@huawei.com>2017-10-12 05:34:50 -0400
committerLeo wang <grakiss.wanglei@huawei.com>2017-10-12 09:49:27 +0000
commitb54893f97bdef42cd7b9e5c8fa4dd080c13d64bd (patch)
tree3a06420c27e4f176d4df3fa74a01ccf77d59946c /cvp/docker
parent8b916429666565f5b7b1ffda7dc912addb308152 (diff)
[web-cvp]add a api to fecth logs of backend api
JIRA: DOVETAIL-525 provide a easy way to fetch logs of backend apis Change-Id: I72054a6e155e6970254ed391dfa8b25943eceb35 Signed-off-by: grakiss <grakiss.wanglei@huawei.com>
Diffstat (limited to 'cvp/docker')
-rw-r--r--cvp/docker/Dockerfile1
-rw-r--r--cvp/docker/nginx/sites-enabled/default8
2 files changed, 9 insertions, 0 deletions
diff --git a/cvp/docker/Dockerfile b/cvp/docker/Dockerfile
index e0cb32fe..d0a34f37 100644
--- a/cvp/docker/Dockerfile
+++ b/cvp/docker/Dockerfile
@@ -59,6 +59,7 @@ WORKDIR /home/dovetail
RUN git checkout -f $BRANCH
RUN mkdir -p /home/testapi
+RUN mkdir -p /home/testapi/logs/api
RUN cp -rf /home/dovetail/cvp/* /home/testapi
WORKDIR /home/dovetail/cvp
diff --git a/cvp/docker/nginx/sites-enabled/default b/cvp/docker/nginx/sites-enabled/default
index 5e152dd8..b6b6a7ed 100644
--- a/cvp/docker/nginx/sites-enabled/default
+++ b/cvp/docker/nginx/sites-enabled/default
@@ -57,6 +57,14 @@ server {
autoindex_localtime on;
}
+ location ~* /logs/api {
+ root /home/testapi;
+ expires 1d;
+ autoindex on;
+ autoindex_exact_size on;
+ autoindex_localtime on;
+ }
+
location /api/v1/cvp {
proxy_pass http://cvpapi/api/v1/cvp;
proxy_set_header X-Real-IP $remote_addr;