[Why]
Optimize result page style to make it more modern
Signed-off-by: Lu Weitao <luweitaobe(a)163.com>
---
container/srv-http/build | 17 +++++++++++++++++
.../srv-http/root/etc/nginx/conf.d/default.conf | 5 ++---
2 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/container/srv-http/build b/container/srv-http/build
index 3a500ea..6580c55 100755
--- a/container/srv-http/build
+++ b/container/srv-http/build
@@ -2,4 +2,21 @@
# SPDX-License-Identifier: MulanPSL-2.0+
# Copyright (c) 2020 Huawei Technologies Co., Ltd. All rights reserved.
+[[ $H5AI_SRC ]] || H5AI_SRC=/c/h5ai
+
+WORKSPACE=$(dirname $(realpath $0))
+
+# npm build h5ai package
+cd $H5AI_SRC
+npm install
+npm run build
+
+# add h5ai package in ./root/srv to add it into image
+cd $WORKSPACE
+mkdir ./root/srv
+cp -r $H5AI_SRC/build/_h5ai ./root/srv
+
docker build -t srv-http .
+
+# clean h5ai package
+rm -rf ./root/srv
diff --git a/container/srv-http/root/etc/nginx/conf.d/default.conf b/container/srv-http/root/etc/nginx/conf.d/default.conf
index 676418a..646eee3 100644
--- a/container/srv-http/root/etc/nginx/conf.d/default.conf
+++ b/container/srv-http/root/etc/nginx/conf.d/default.conf
@@ -3,8 +3,8 @@ server {
server_name "srv-http";
server_tokens off;
- root /usr/share/nginx/html;
- index index.html;
+ root /srv;
+ index index.html index.php /_h5ai/public/index.php;
charset utf-8,gbk;
@@ -24,7 +24,6 @@ server {
autoindex on;
autoindex_localtime on;
allow all;
- root /srv;
location ~* /[-_a-z]+$ {
add_header Content-Type text/plain;
}
--
2.23.0