Commit 95a88186 authored by daidekun's avatar daidekun

add log

parent b00558c3
...@@ -5,6 +5,9 @@ package_path="/home/quant_group" ...@@ -5,6 +5,9 @@ package_path="/home/quant_group"
echo "cd ${package_path}" echo "cd ${package_path}"
cd ${package_path} cd ${package_path}
export NAMESPACE=`cat /var/run/secrets/kubernetes.io/serviceaccount/namespace`
echo "NAMESPACE is $NAMESPACE"
for entry in ./*tgz for entry in ./*tgz
do do
with_ext=$(basename "$entry") with_ext=$(basename "$entry")
...@@ -17,10 +20,17 @@ do ...@@ -17,10 +20,17 @@ do
tar zxf ${package_path}/$with_ext -C ${package_path}/$fname tar zxf ${package_path}/$with_ext -C ${package_path}/$fname
done done
echo "sed sed xyqb.com to q-gp.com" echo "cd /home/qg-xterm/;git pull;cd -"
namespace=`cat /var/run/secrets/kubernetes.io/serviceaccount/namespace` cd /home/qg-xterm/;git pull;cd -
echo "namespace is $namespace"
find ${package_path}/ -name "*.js" | xargs sed -i "s/.xyqb.com/-$namespace.q-gp.com/g" find ${package_path}/ -name "*.js" | xargs sed -i "s/.xyqb.com/-$NAMESPACE.q-gp.com/g"
sed -i "s/xterm.js demo/${SYSTEM_NAME}@${NAMESPACE}/" /home/qg-xterm/demo/index.html
echo "/usr/bin/openresty -g 'daemon off;'" echo "/usr/bin/openresty -g 'daemon off;'"
/usr/bin/openresty -g 'daemon off;' nohup /usr/bin/openresty -g 'daemon off;' &
\ No newline at end of file
echo "node /home/qg-xterm/demo/app.js"
nohup node /home/qg-xterm/demo/app.js &
echo "frontail logs/*.log -d -n 1000"
frontail /usr/local/openresty/nginx/logs/*log -n 1000
\ No newline at end of file
...@@ -12,7 +12,10 @@ http { ...@@ -12,7 +12,10 @@ http {
'$status $body_bytes_sent "$http_referer" ' '$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" $http_x_forwarded_for ' '"$http_user_agent" $http_x_forwarded_for '
'"$upstream_addr" "$upstream_status" "$upstream_response_time" "$request_time" "$http_cookie"'; '"$upstream_addr" "$upstream_status" "$upstream_response_time" "$request_time" "$http_cookie"';
access_log /usr/local/openresty/nginx/logs/access.log;
error_log /usr/local/openresty/nginx/logs/error.log;
server_names_hash_bucket_size 64; server_names_hash_bucket_size 64;
sendfile on; sendfile on;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment