Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qg-docker-entrypoints
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
QA
qg-docker-entrypoints
Commits
8213d9bc
Commit
8213d9bc
authored
May 10, 2018
by
kalvin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
deleteLogs
parent
492e82db
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
93 additions
and
5 deletions
+93
-5
run.sh
dev/java/run.sh
+2
-2
run.sh
dev/lua-ui/run.sh
+31
-1
run.sh
dev/nodejs/run.sh
+30
-1
run.sh
dev/python/run.sh
+30
-1
No files found.
dev/java/run.sh
View file @
8213d9bc
...
...
@@ -77,7 +77,7 @@ if [[ $CLUSTER == "3B" ]]; then
else
echo
"clean
${
log_path
}
/*"
#历史遗留问题,抽空fix
replaceGitRemote
()
replaceGitRemote
rm
-rf
${
log_path
}
/
*
echo
"kill java process"
...
...
@@ -154,7 +154,7 @@ else
echo
'替换后的'
$remoteGit
git remote set-url origin
$remoteGit
||
echo
"修改失败"
#状态
fi
cd
..
cd
-
}
fi
dev/lua-ui/run.sh
View file @
8213d9bc
...
...
@@ -2,6 +2,9 @@
echo
"start run lua-ui"
package_path
=
"/home/quant_group"
#历史遗留问题,抽空fix
replaceGitRemote
echo
"cd
${
package_path
}
"
cd
${
package_path
}
...
...
@@ -54,4 +57,31 @@ echo "node /home/qg-xterm/demo/app.js"
nohup
node /home/qg-xterm/demo/app.js &
echo
"frontail logs/*.log -d -n 1000"
frontail /var/log/nginx/
*
log
-n
1000
\ No newline at end of file
frontail /var/log/nginx/
*
log
-n
1000
replaceGitRemote
(){
originDomain
=
"192.168.3.60"
activeDomain
=
"git.q-gp.com"
gdir
=
/home/qg-xterm
cd
$gdir
&&
echo
'进入'
$gdir
git rev-parse
--is-inside-work-tree
2>&1 1>/dev/null
;
# 有个不行
if
[
$?
-ne
0
]
then
echo
"不是git目录
$gdir
"
$?
;
cd
..
continue
fi
remoteUrl
=
`
git config
--get
remote.origin.url
`
echo
$remoteUrl
|
grep
$originDomain
if
[
$?
-eq
0
]
then
remoteGit
=
"
${
remoteUrl
/
$originDomain
/
$activeDomain
}
"
echo
'替换后的'
$remoteGit
git remote set-url origin
$remoteGit
||
echo
"修改失败"
#状态
fi
cd
-
}
\ No newline at end of file
dev/nodejs/run.sh
View file @
8213d9bc
...
...
@@ -5,6 +5,8 @@ package_path="/home/quant_group/project"
echo
"cd
${
package_path
}
"
cd
${
package_path
}
replaceGitRemote
echo
"tar zxf dist.tgz -C
${
package_path
}
"
tar
zxf
${
package_path
}
/dist.tgz
-C
${
package_path
}
/
...
...
@@ -45,4 +47,31 @@ echo "node /home/qg-xterm/demo/app.js"
nohup
node /home/qg-xterm/demo/app.js &
echo
"frontail logs/*.log -d -n 1000"
frontail ./logs/
*
log
-n
1000
\ No newline at end of file
frontail ./logs/
*
log
-n
1000
replaceGitRemote
(){
originDomain
=
"192.168.3.60"
activeDomain
=
"git.q-gp.com"
gdir
=
/home/qg-xterm
cd
$gdir
&&
echo
'进入'
$gdir
git rev-parse
--is-inside-work-tree
2>&1 1>/dev/null
;
# 有个不行
if
[
$?
-ne
0
]
then
echo
"不是git目录
$gdir
"
$?
;
cd
..
continue
fi
remoteUrl
=
`
git config
--get
remote.origin.url
`
echo
$remoteUrl
|
grep
$originDomain
if
[
$?
-eq
0
]
then
remoteGit
=
"
${
remoteUrl
/
$originDomain
/
$activeDomain
}
"
echo
'替换后的'
$remoteGit
git remote set-url origin
$remoteGit
||
echo
"修改失败"
#状态
fi
cd
-
}
\ No newline at end of file
dev/python/run.sh
View file @
8213d9bc
...
...
@@ -2,6 +2,8 @@
echo
"deploy xyqp-query"
package_path
=
"/home/quant_group/project"
replaceGitRemote
echo
"cd
${
package_path
}
"
cd
${
package_path
}
source
~/.bash_profile
...
...
@@ -15,4 +17,31 @@ echo "rm dist.tgz public/dist -rf"
rm
-rf
${
package_path
}
/dist.tgz
echo
"python run.py --mode=beta --port=80"
python
${
package_path
}
/server/run.py
--mode
=
beta
--port
=
80
\ No newline at end of file
python
${
package_path
}
/server/run.py
--mode
=
beta
--port
=
80
replaceGitRemote
(){
originDomain
=
"192.168.3.60"
activeDomain
=
"git.q-gp.com"
gdir
=
/home/qg-xterm
cd
$gdir
&&
echo
'进入'
$gdir
git rev-parse
--is-inside-work-tree
2>&1 1>/dev/null
;
# 有个不行
if
[
$?
-ne
0
]
then
echo
"不是git目录
$gdir
"
$?
;
cd
..
continue
fi
remoteUrl
=
`
git config
--get
remote.origin.url
`
echo
$remoteUrl
|
grep
$originDomain
if
[
$?
-eq
0
]
then
remoteGit
=
"
${
remoteUrl
/
$originDomain
/
$activeDomain
}
"
echo
'替换后的'
$remoteGit
git remote set-url origin
$remoteGit
||
echo
"修改失败"
#状态
fi
cd
-
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment