mirror of
https://github.com/aljazceru/python-teos.git
synced 2025-12-18 06:34:19 +01:00
Dockerfile and entrypoint
This commit is contained in:
11
Dockerfile
Normal file
11
Dockerfile
Normal file
@@ -0,0 +1,11 @@
|
||||
FROM python:3
|
||||
ENV APP_PATH=/srv/python-teos
|
||||
VOLUME ["~/.teos"]
|
||||
WORKDIR /srv
|
||||
RUN mkdir ~/.teos && git clone https://github.com/talaia-labs/python-teos && cd python-teos && pip install -r requirements.txt && python generate_keys.py -d ~/.teos
|
||||
ENV PYTHONPATH=$APP_PATH
|
||||
WORKDIR /srv/python-teos
|
||||
COPY entrypoint.sh /srv/python-teos/entrypoint.sh
|
||||
RUN chmod +x /srv/python-teos/entrypoint.sh
|
||||
ENTRYPOINT [ "/srv/python-teos/entrypoint.sh" ]
|
||||
#CMD ["sh","-c","/usr/local/bin/python3 -m teos.teosd --btcrpcuser=$BTC_RPC_USER --btcrpcpassword=$BTC_RPC_PASSWD --btcrpcconnect=$BTC_RPC_HOST"]
|
||||
21
entrypoint.sh
Normal file
21
entrypoint.sh
Normal file
@@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
START_COMMAND="/usr/local/bin/python3 -m teos.teosd "
|
||||
|
||||
if [[ ! -z ${BTC_RPC_USER} ]]; then
|
||||
START_COMMAND=$START_COMMAND" --btcrpcuser=""$BTC_RPC_USER"
|
||||
fi
|
||||
|
||||
if [[ ! -z ${BTC_RPC_HOST} ]]; then
|
||||
START_COMMAND=$START_COMMAND" --btcrpcconnect=""$BTC_RPC_HOST"
|
||||
fi
|
||||
|
||||
if [[ ! -z ${BTC_RPC_PASSWD} ]]; then
|
||||
START_COMMAND=$START_COMMAND" --btcrpcpassword=""$BTC_RPC_PASSWD"
|
||||
fi
|
||||
|
||||
if [[ ! -z ${BTC_NETWORK} ]]; then
|
||||
START_COMMAND=$START_COMMAND" --btcnetwork=""$BTC_NETWORK"
|
||||
fi
|
||||
|
||||
$START_COMMAND
|
||||
Reference in New Issue
Block a user