Merge "Add UT: ArithmeticRunner exception handling"
[yardstick.git] / docker / nginx.sh
1 #!/bin/bash
2 ##############################################################################
3 # Copyright (c) 2017 Huawei Technologies Co.,Ltd and others.
4 #
5 # All rights reserved. This program and the accompanying materials
6 # are made available under the terms of the Apache License, Version 2.0
7 # which accompanies this distribution, and is available at
8 # http://www.apache.org/licenses/LICENSE-2.0
9 ##############################################################################
10
11 # nginx config
12 nginx_config='/etc/nginx/conf.d/yardstick.conf'
13
14 if [[ ! -e "${nginx_config}" ]];then
15
16     cat << EOF > "${nginx_config}"
17 server {
18     listen 5000;
19     server_name localhost;
20     index  index.htm index.html;
21     location / {
22         include uwsgi_params;
23         client_max_body_size    2000m;
24         uwsgi_pass unix:///var/run/yardstick.sock;
25     }
26
27     location /gui/ {
28         alias /etc/nginx/yardstick/gui/;
29     }
30
31     location /report/ {
32         alias /tmp/;
33     }
34 }
35 EOF
36 fi