This commit is contained in:
lifei6671 2017-05-01 14:10:39 +08:00
parent d874331535
commit dc2acb92c1

View File

@ -12,24 +12,24 @@ if [ ! -f "conf/app.conf" ] ; then
cp conf/app.conf.example conf/app.conf
fi
if [ ! -z $db_host ] ; then
sed -i 's/^db_host.*/db_host='$db_host'/g' conf/app.conf
if [ ! -z $MYSQL_PORT_3306_TCP_ADDR ] ; then
sed -i 's/^db_host.*/db_host='$MYSQL_PORT_3306_TCP_ADDR'/g' conf/app.conf
fi
if [ ! -z $db_port ] ; then
sed -i 's/^db_port.*/db_port='$db_port'/g' conf/app.conf
if [ ! -z $MYSQL_PORT_3306_TCP_PORT ] ; then
sed -i 's/^db_port.*/db_port='$MYSQL_PORT_3306_TCP_PORT'/g' conf/app.conf
fi
if [ ! -z $db_database ] ; then
sed -i 's/^db_database.*/db_database='$db_database'/g' conf/app.conf
if [ ! -z $MYSQL_INSTANCE_NAME ] ; then
sed -i 's/^db_database.*/db_database='$MYSQL_INSTANCE_NAME'/g' conf/app.conf
fi
if [ ! -z $db_username ] ; then
sed -i 's/^db_username.*/db_username='$db_username'/g' conf/app.conf
if [ ! -z $MYSQL_USERNAME ] ; then
sed -i 's/^db_username.*/db_username='$MYSQL_USERNAME'/g' conf/app.conf
fi
if [ ! -z $db_password ] ; then
sed -i 's/^db_password.*/db_password='$db_password'/g' conf/app.conf
if [ ! -z $MYSQL_PASSWORD ] ; then
sed -i 's/^db_password.*/db_password='$MYSQL_PASSWORD'/g' conf/app.conf
fi
if [ ! -z $httpport ] ; then