diff --git a/Dockerfile b/Dockerfile index e7b0c2d..09431e5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,4 +5,5 @@ WORKDIR /srv RUN mkdir ~/.teos && git clone https://github.com/aljazceru/python-teos.git && cd python-teos && pip install -r requirements.txt && python generate_keys.py -d ~/.teos ENV PYTHONPATH=$APP_PATH WORKDIR /srv/python-teos +EXPOSE 9814/tcp ENTRYPOINT [ "/srv/python-teos/entrypoint.sh" ] diff --git a/README.md b/README.md index 44bd374..0b4c60d 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ To run `teos` you need a set of keys (to sign appointments) stored in your data git clone https://github.com/talaia-labs/python-teos cd python-teos docker build . -t teos - docker run -it -e BTC_RPC_USER= -e BTC_RPC_PASSWD= -e BTC_RPC_HOST= -e BTC_RPC_PORT= teos + docker run -it -e BTC_RPC_USER= -e BTC_RPC_PASSWD= -e BTC_RPC_HOST= -e BTC_RPC_PORT= -p 9814:9814/tcp teos ### Configuration file and command line parameters @@ -129,4 +129,4 @@ cp ~/.teos/teos_pk.der ~/.teos_cli/teos_pk.der ``` ## Contributing -Refer to [CONTRIBUTING.md](CONTRIBUTING.md) \ No newline at end of file +Refer to [CONTRIBUTING.md](CONTRIBUTING.md) diff --git a/entrypoint.sh b/entrypoint.sh index 354af05..a82b8b1 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -18,4 +18,13 @@ if [[ ! -z ${BTC_NETWORK} ]]; then START_COMMAND=$START_COMMAND" --btcnetwork=""$BTC_NETWORK" fi -$START_COMMAND \ No newline at end of file +if [[ ! -z ${API_CONNECT} ]]; then + START_COMMAND=$START_COMMAND" --apiconnect=""$API_CONNECT" +fi + +if [[ ! -z ${API_PORT} ]]; then + START_COMMAND=$START_COMMAND" --apiport=""$API_PORT" +fi + + +$START_COMMAND