Updating entrypoint and dockerfile (#237)

This commit is contained in:
Philip Hutchins 2018-08-16 14:03:15 -04:00 committed by GitHub
parent ff65663867
commit bfac1297f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 3 deletions

View File

@ -13,6 +13,7 @@ ENV KAD_HOST=bootstrap.storj.io \
KAD_LISTEN_PORT=7776 \
KAD_PORT=8080 \
PSID= \
CONF_PATH= \
PS_DIR=/home/ \
PUBLIC_IP=127.0.0.1 \
RPC_PORT=7777

View File

@ -4,7 +4,15 @@ set -euo pipefail
# Create a new farmer, if the ID for an existing farmer isn't specified.
if [[ -z $PSID ]]; then
mkdir -p "${PS_DIR}"
export PSID=$(./piecestore-farmer create | awk '/created/ { print $2 }')
echo "Created farmer $PSID"
# Needs updating for new method of creating certs
#export PSID=$(./piecestore-farmer setup | awk '/created/ { print $2 }')
echo "(DISABLED) Created farmer $PSID"
fi
exec ./piecestore-farmer start $PSID
RUN_PARAMS=''
if [[ -z $CONF_PATH ]]; then
RUN_PARAMS="${RUN_PARAMS} --config ${CONF_PATH}"
fi
exec ./farmer run $RUN_PARAMS