Skip to content

Commit

Permalink
Merge pull request hacklcx#44 from soar1688/master
Browse files Browse the repository at this point in the history
update v0.5
  • Loading branch information
sanjinhub authored Dec 6, 2019
2 parents 24132ac + ed929c1 commit bebcc1d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
4 changes: 2 additions & 2 deletions dockerfile/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM alpine:latest

ENV GLIBC_VERSION 2.29-r0
ENV HFISH_VERSION 0.4
ENV HFISH_VERSION 0.5

# Download and install glibc
RUN apk update && \
Expand All @@ -22,7 +22,7 @@ COPY Entrypoint.sh /Entrypoint.sh

RUN chmod +x /Entrypoint.sh

EXPOSE 21 22 23 69 3306 5900 6379 7879 8000 8080 8989 9000 9001 9200 11211
EXPOSE 21 22 23 69 3306 5900 6379 7879 8080 8081 8989 9000 9001 9200 11211

WORKDIR /opt

Expand Down
5 changes: 1 addition & 4 deletions dockerfile/Entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ HFISH_DIR=/opt/HFish

if [ ! -d $HFISH_DIR ];then
mv /tmp/HFish $HFISH_DIR
sed -i "71s/addr = 0.0.0.0:8080/addr = 0.0.0.0:8000/" $HFISH_DIR/config.ini
fi

if [ ! -z "$CLUSTER_IP" ];then
Expand All @@ -28,9 +27,7 @@ if [ ! -z "$MYSQL_USER" ] && [ ! -z "$MYSQL_PASSWORD" ] && [ ! -z "$MYSQL_IP" ]
sed -i "s/db_type = sqlite/db_type = mysql/" $HFISH_DIR/config.ini
sed -i "s#^db_str = .*rwc#db_str = $MYSQL_USER:$MYSQL_PASSWORD@tcp\($MYSQL_IP:$MYSQL_PORT\)\/$MYSQL_DATABASE\?charset=utf8\&parseTime=true\&loc=Local#" $HFISH_DIR/config.ini
if [ ! -f $HFISH_DIR/db/sql/import_sql.log ];then
mysql -h $MYSQL_IP -P $MYSQL_PORT -u$MYSQL_USER -p$MYSQL_PASSWORD -D $MYSQL_DATABASE < $HFISH_DIR/db/sql/hfish_colony.sql &&
mysql -h $MYSQL_IP -P $MYSQL_PORT -u$MYSQL_USER -p$MYSQL_PASSWORD -D $MYSQL_DATABASE < $HFISH_DIR/db/sql/hfish_info.sql &&
mysql -h $MYSQL_IP -P $MYSQL_PORT -u$MYSQL_USER -p$MYSQL_PASSWORD -D $MYSQL_DATABASE < $HFISH_DIR/db/sql/hfish_setting.sql &&
mysql -h $MYSQL_IP -P $MYSQL_PORT -u$MYSQL_USER -p$MYSQL_PASSWORD -D $MYSQL_DATABASE < $HFISH_DIR/db/sql/hfish_db.sql &&
echo "SQL import time: `date "+%Y-%m-%d %H:%M:%S"`" > $HFISH_DIR/db/sql/import_sql.log
fi
fi
Expand Down

0 comments on commit bebcc1d

Please sign in to comment.