Skip to content

Commit

Permalink
Update Dockerfile to mainnet
Browse files Browse the repository at this point in the history
  • Loading branch information
harrywong committed Dec 10, 2018
1 parent 4929087 commit aa6a96d
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 25 deletions.
4 changes: 2 additions & 2 deletions Docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ COPY --from=builder /etc/evt-version /etc
COPY config.ini /
COPY evtd.sh /opt/evt/bin/evtd.sh
COPY evtwd.sh /opt/evt/bin/evtwd.sh
RUN chmod +x /opt/evt/bin/evtd.sh
RUN chmod +x /opt/evt/bin/evtwd.sh
RUN chmod +x /opt/evt/bin/evtd.sh
RUN chmod +x /opt/evt/bin/evtwd.sh

ENV EVT_ROOT=/opt/evt
ENV LD_LIBRARY_PATH /usr/local/lib
Expand Down
6 changes: 4 additions & 2 deletions Docker/mainnet/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,10 @@ COPY --from=builder /tmp/build/bin /opt/evt/bin
COPY --from=builder /etc/evt-version /etc

COPY config.ini /
COPY evtd.sh /opt/evt/bin/evtd.sh
RUN chmod +x /opt/evt/bin/evtd.sh
COPY evtd.sh /opt/evt/bin/evtd.sh
COPY evtwd.sh /opt/evt/bin/evtwd.sh
RUN chmod +x /opt/evt/bin/evtd.sh
RUN chmod +x /opt/evt/bin/evtwd.sh

ENV EVT_ROOT=/opt/evt
ENV LD_LIBRARY_PATH /usr/local/lib
Expand Down
17 changes: 0 additions & 17 deletions Docker/mainnet/evtc.sh

This file was deleted.

10 changes: 6 additions & 4 deletions Docker/mainnet/evtd.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#!/bin/sh
cd /opt/evt/bin

if [ -f '/opt/evt/etc/config.ini' ]; then
if [ -f '/opt/evt/etc/evtd/config.ini' ]; then
echo
else
mkdir /opt/evt/etc
cp /config.ini /opt/evt/etc
mkdir /opt/evt/etc/evtd
cp /config.ini /opt/evt/etc/evtd
fi

while :; do
Expand All @@ -20,11 +21,12 @@ while :; do
done

if [ ! "$CONFIG_DIR" ]; then
CONFIG_DIR="--config-dir=/opt/evt/etc"
CONFIG_DIR="--config-dir=/opt/evt/etc/evtd"
else
CONFIG_DIR=""
fi

DATA_DIR="--data-dir=/opt/evt/data"
SNAPSHOTS_DIR="--snapshots-dir=/opt/evt/snapshots"

exec /opt/evt/bin/evtd $CONFIG_DIR $DATA_DIR $@
exec /opt/evt/bin/evtd $CONFIG_DIR $DATA_DIR $SNAPSHOTS_DIR $@
31 changes: 31 additions & 0 deletions Docker/mainnet/evtwd.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/sh
cd /opt/evt/bin

if [ -f '/opt/evt/etc/evtwd/config.ini' ]; then
echo
else
mkdir /opt/evt/etc
mkdir /opt/evt/etc/evtwd
fi

while :; do
case $1 in
--config-dir=?*)
CONFIG_DIR=${1#*=}
;;
*)
break
esac
shift
done

if [ ! "$CONFIG_DIR" ]; then
CONFIG_DIR="--config-dir=/opt/evt/etc/evtwd"
else
CONFIG_DIR=""
fi

WALLET_DIR="--wallet-dir=/opt/evt/data/wallet"
DATA_DIR="--data-dir=/opt/evt/data/wallet"

exec /opt/evt/bin/evtwd $CONFIG_DIR $DATA_DIR $WALLET_DIR $@

0 comments on commit aa6a96d

Please sign in to comment.