Commit 35c89e7d authored by daidekun's avatar daidekun

init file

parent b7e8b7bf
...@@ -19,4 +19,12 @@ RUN apt-get update \ ...@@ -19,4 +19,12 @@ RUN apt-get update \
&& apt-get install -y vim \ && apt-get install -y vim \
&& apt-get install -y telnet \ && apt-get install -y telnet \
&& apt-get install -y openssh-server \ && apt-get install -y openssh-server \
&& /etc/init.d/ssh start && /etc/init.d/ssh start
\ No newline at end of file
RUN chmod +x ./docker-entrypoint.sh
WORKDIR /home/quant_group/mysql
COPY ./sql_to_run .
COPY docker-entrypoint.sh .
COPY db_execute_sql.sh .
CMD ["./docker-entrypoint.sh"]
\ No newline at end of file
# -------------------------------------------------------------------------------
# Filename: db_execute_sql.sh
# Revision: 1.0
# Date: 2017/08
# Author: dekun.dai
# Description: 执行目录下所有数据库脚本
# -------------------------------------------------------------------------------
mysql_host=$1
sql_file_folder=./sql_to_run
echo "cd $sql_file_folder"
cd $sql_file_folder
for entry in ./*
do
echo "run sql file: $entry"
mysql -h $mysql_host -uroot -pQuantgroup2017 < $entry
done
\ No newline at end of file
#!/bin/sh
public_ip="www.q-gp.com"
echo "java_start java"
module_name="redpacket"
package_path="./redpacket/redpacket-0.0.1-master-SNAPSHOT.jar"
echo "java -Xmx512m -XX:PermSize64m -Xloggc:/tmp/${module_name}_gc.log -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -jar ${package_path} --worker 1 --currentWorker 1 -t > /dev/null 2>&1"
java -Xmx512m -XX:PermSize64m -Xloggc:/tmp/${module_name}_gc.log -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -jar ${package_path} --worker 1 --currentWorker 1 -t > /dev/null 2>&1
\ No newline at end of file
GRANT ALL PRIVILEGES ON *.* TO 'qa'@'%' IDENTIFIED BY 'qatest';
flush privileges;
\ No newline at end of file
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