Merge pull request #19 from hacklcx/dev

Dev
This commit is contained in:
SanJin 2019-08-28 18:17:09 +08:00 committed by GitHub
commit 70b908f9a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 13 deletions

View File

@ -1,7 +1,7 @@
FROM alpine:latest
ENV GLIBC_VERSION 2.29-r0
ENV HFISH_VERSION 0.2
ENV HFISH_VERSION 0.3
# Download and install glibc
RUN apk update && \
@ -13,16 +13,16 @@ RUN apk update && \
apk add glibc-bin.apk glibc.apk && \
rm -rf glibc.apk glibc-bin.apk /var/cache/apk/*
RUN curl -Lo /tmp/hfish.tar.gz https://github.com/hacklcx/HFish/releases/download/${HFISH_VERSION}/hfish-${HFISH_VERSION}-linux-amd64.tar.gz && \
tar -zxvf /tmp/hfish.tar.gz -C /tmp && \
mv /tmp/hfish-${HFISH_VERSION}-linux-amd64 /tmp/hfish && \
rm -f /tmp/hfish.tar.gz /tmp/hfish/LICENSE /tmp/hfish/README.md
RUN curl -Lo /tmp/HFish.tar.gz https://github.com/hacklcx/HFish/releases/download/${HFISH_VERSION}/HFish-${HFISH_VERSION}-linux-amd64.tar.gz && \
tar -zxvf /tmp/HFish.tar.gz -C /tmp && \
mv /tmp/HFish-${HFISH_VERSION}-linux-amd64 /tmp/HFish && \
rm -f /tmp/HFish.tar.gz /tmp/HFish/LICENSE /tmp/HFish/README.md
COPY Entrypoint.sh /Entrypoint.sh
RUN chmod +x /Entrypoint.sh
EXPOSE 21 22 23 3306 6379 7879 9000 9001 9002
EXPOSE 21 22 23 3306 6379 7879 8080 8989 9000 9001 11211
ENTRYPOINT ["/Entrypoint.sh"]

View File

@ -1,16 +1,11 @@
#!/bin/sh
HFISH_DIR=/opt/hfish
HFISH_DIR=/opt/HFish
if [ ! -d $HFISH_DIR ];then
mv /tmp/hfish $HFISH_DIR
mv /tmp/HFish $HFISH_DIR
sed -i "s/status = 0/status = 1/g" $HFISH_DIR/config.ini
sed -i "s/127.0.0.1/0.0.0.0/g" $HFISH_DIR/config.ini
sed -i "s/dart_report/deep_report/" $HFISH_DIR/web/deep/static/x.js
fi
if [ ! -z "$API_IP" ];then
sed -i "s/localhost:9001/$API_IP/" `find $HFISH_DIR/web -name x.js`
fi
if [ ! -z "$CLUSTER_IP" ];then