storj/cmd/piecestore-farmer/entrypoint
Alexander Leitner cde0ffaa52 Add dockerfile and yaml for setting up piecestore servers (#102)
* Add dockerfile and yaml for setting up piecestore servers

* Fix dockerfile for @aleitner (#115)

* Fix dockerfile for @aleitner

* Move files for @coyle

* Update yaml

* My linter had some errors so I resolved them

* Make jenkins do the needful

* Make piecestore-farmer look like overlay's build process

* Fix service spec to work in staging

* Make Jenkins push images, but not deploy them, yet.

* Modify entrypoint to fit new verbs

* Update piecestore-farmer entrypoint script to handle new app output
2018-07-19 15:42:50 -04:00

17 lines
486 B
Bash
Executable File

#!/bin/sh
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 \
--pieceStoreHost=${PUBLIC_IP} \
--pieceStorePort=${RPC_PORT} \
--kademliaPort=${KAD_PORT} \
--kademliaHost=${KAD_HOST} \
--kademliaListenPort=${KAD_LISTEN_PORT} \
--dir=${PS_DIR} | awk '/created/ { print $2 }')
echo "Created farmer $PSID"
fi
exec ./piecestore-farmer start $PSID