Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qg-dockerfiles
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-dockerfiles
Commits
2d4fcc60
Commit
2d4fcc60
authored
Mar 13, 2018
by
kalvin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加cluster参数,用于区分生产镜像和测试开发镜像
parent
8259bf0a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
5 deletions
+16
-5
Dockerfile
templates/java/Dockerfile
+3
-2
docker-entrypoint.sh
templates/java/docker-entrypoint.sh
+13
-3
No files found.
templates/java/Dockerfile
View file @
2d4fcc60
...
...
@@ -9,14 +9,15 @@ ARG BUILD_NUMBER
ARG
SYSTEM_NAME
ARG
BRANCH_NAME
ARG
BUILD_TIME
ARG
CLUSTER
ENV
BUILD_NUMBER=$BUILD_NUMBER
ENV
SYSTEM_NAME=$SYSTEM_NAME
ENV
BRANCH_NAME=$BRANCH_NAME
ENV
BUILD_TIME=$BUILD_TIME
ENV
CLUSTER=$CLUSTER
RUN
echo
"BUILD_TIME:
${
BUILD_TIME
}
,BUILD_NUMBER:
${
BUILD_NUMBER
}
,SYSTEM_NAME:
${
SYSTEM_NAME
}
,BRANCH_NAME:
${
BRANCH_NAME
}
"
>>
./build_info
RUN
echo
"BUILD_TIME:
${
BUILD_TIME
}
,BUILD_NUMBER:
${
BUILD_NUMBER
}
,SYSTEM_NAME:
${
SYSTEM_NAME
}
,BRANCH_NAME:
${
BRANCH_NAME
}
, CLUSTER:
${
CLUSTER
}
"
>>
./build_info
COPY
docker-entrypoint.sh .
COPY
./*.jar /home/quant_group/project/app.jar
...
...
templates/java/docker-entrypoint.sh
View file @
2d4fcc60
...
...
@@ -13,10 +13,20 @@ sed -i "s#.quantgroup.cn#-$NAMESPACE.q-gp.com#g" ${config_path}
sed
-i
"s#xterm.js demo#
${
SYSTEM_NAME
}
@
${
NAMESPACE
}
#"
/home/qg-xterm/demo/index.html
#echo "nohup java -Xmx512m -XX:PermSize64m -XX:MaxMetaspaceSize=128m -Xloggc:/tmp/${module_name}_gc.log -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -Denv=dev -Didc=k8s -Dtest=true -jar ${package_path} --worker 1 --currentWorker 1 -t --server.port=80 --spring.config.location=${config_path} & " > java_command
if
$CLUSTER
eq
"pro"
;
then
#初始化变量
export
db
=
"192.168.4.72"
#export rabbitmq=“192.168.4.72”
#export redis="192.168.4.72"
#export zookeeper="192.168.4.72"
echo
"nohup java -Xmx512m -Xloggc:/tmp/
${
module_name
}
_gc.log -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -Denv=dev -Didc=k8s -Dtest=true -jar
${
package_path
}
--worker 1 --currentWorker 1 -t --server.port=80 --spring.config.location=
${
config_path
}
& "
>
java_command
nohup
java
-Xmx512m
-Xloggc
:/tmp/
${
module_name
}
_gc.log
-XX
:+PrintGCDetails
-XX
:+PrintGCTimeStamps
-Denv
=
pro
-Didc
=
k8s
-Dtest
=
true
-jar
${
package_path
}
--worker
1
--currentWorker
1
-t
--server
.port
=
80
--spring
.config.location
=
${
config_path
}
&
else
echo
"nohup java -Xmx512m -Xloggc:/tmp/
${
module_name
}
_gc.log -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -Denv=dev -Didc=k8s -Dtest=true -jar
${
package_path
}
--worker 1 --currentWorker 1 -t --server.port=80 --spring.config.location=
${
config_path
}
& "
>
java_command
nohup
java
-Xmx512m
-Xloggc
:/tmp/
${
module_name
}
_gc.log
-XX
:+PrintGCDetails
-XX
:+PrintGCTimeStamps
-Denv
=
dev
-Didc
=
k8s
-Dtest
=
true
-jar
${
package_path
}
--worker
1
--currentWorker
1
-t
--server
.port
=
80
--spring
.config.location
=
${
config_path
}
&
fi
echo
"nohup java -Xmx512m -Xloggc:/tmp/
${
module_name
}
_gc.log -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -Denv=dev -Didc=k8s -Dtest=true -jar
${
package_path
}
--worker 1 --currentWorker 1 -t --server.port=80 --spring.config.location=
${
config_path
}
& "
>
java_command
nohup
java
-Xmx512m
-Xloggc
:/tmp/
${
module_name
}
_gc.log
-XX
:+PrintGCDetails
-XX
:+PrintGCTimeStamps
-Denv
=
dev
-Didc
=
k8s
-Dtest
=
true
-jar
${
package_path
}
--worker
1
--currentWorker
1
-t
--server
.port
=
80
--spring
.config.location
=
${
config_path
}
&
echo
"sleep 10"
sleep
10
...
...
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