From 9c2b3f5bd971ea49d8d18fb31ff512ee158958e0 Mon Sep 17 00:00:00 2001 From: Vivek Teega Date: Tue, 16 Nov 2021 15:28:50 +0000 Subject: [PATCH] 1.0.0 Addition of supervisor commands for Ranchimallflo api --- dockerfile => Dockerfile | 58 +++++++++++++++++++++++++++------------- 1 file changed, 40 insertions(+), 18 deletions(-) rename dockerfile => Dockerfile (51%) diff --git a/dockerfile b/Dockerfile similarity index 51% rename from dockerfile rename to Dockerfile index 5658c71..ec8c2fb 100644 --- a/dockerfile +++ b/Dockerfile @@ -18,25 +18,11 @@ RUN apt-get -y install git ENV DEBIAN_FRONTEND noninteractive ENV DEBCONF_NONINTERACTIVE_SEEN true -#RUN apt-get -y install python-chardet -RUN apt-get -y install libsecp256k1-dev -RUN apt-get -y install libssl-dev build-essential automake pkg-config libtool libffi-dev libgmp-dev libyaml-cpp-dev -Run git clone https://github.com/ranchimall/ranchimallflo-api -WORKDIR ranchimallflo-api - -RUN pip3 install -r requirements.txt -RUN pip3 install apscheduler -RUN touch config.py -RUN echo "dbfolder = '/home/production/dev/shivam/ranchimallflo-api' \n\ -sse_pubKey = '''''''' \n\ -apiUrl = 'https://flosight.duckdns.org/api/' \n\ -apilayerAccesskey = ''''''' \n\ -FLO_DATA_DIR = '/home/production/.flo' " >> /ranchimallflo-api/config.py -RUN python3 ranchimallflo_api.py +# Flo Token Tracker RUN git clone https://github.com/vivekteega/ftt-docker WORKDIR ftt-docker RUN sed -i "s|chardet==4.0.0|chardet|g" /ftt-docker/requirements.txt -RUN pip3 install -r requirements.txt +# RUN pip3 install -r requirements.txt RUN touch config.ini RUN echo "[DEFAULT] \n\ @@ -48,8 +34,44 @@ RUN touch config.py RUN echo "committeeAddressList = ['''''''''] \n\ sseAPI_url = 'https://ranchimallflo-testnet.duckdns.org/' \n\ privKey = ''''''' " >> /ftt-docker/config.py + +# Ranchimallflo API +WORKDIR ../ RUN git clone https://github.com/ranchimall/pyflo WORKDIR pyflo -RUN python3 setup.py install +#RUN python3 setup.py install WORKDIR ../ -Run python3 tracktokens-smartcontracts.py +#Run python3 tracktokens-smartcontracts.py + +#RUN apt-get -y install python-chardet +RUN apt-get -y install libsecp256k1-dev +RUN apt-get -y install libssl-dev build-essential automake pkg-config libtool libffi-dev libgmp-dev libyaml-cpp-dev +RUN git clone https://github.com/ranchimall/ranchimallflo-api +WORKDIR ranchimallflo-api + +#RUN pip3 install -r requirements.txt +#RUN pip3 install apscheduler +RUN touch config.py +#RUN echo "dbfolder = '/home/production/dev/shivam/ranchimallflo-api' \n\ +#sse_pubKey = '''''''' \n\ +#apiUrl = 'https://flosight.duckdns.org/api/' \n\ +#apilayerAccesskey = ''''''' \n\ +#FLO_DATA_DIR = '/home/production/.flo' " >> /ranchimallflo-api/config.py +#RUN python3 ranchimallflo_api.py + +# Floscout + +# Supervisor configurations +RUN apt-get install supervisor +WORKDIR /etc/supervisor/conf.d/ +RUN touch ranchimallflo-api.conf +RUN echo "[program:ranchimallflo-api]\n\ +directory=/ranchimallflo-api\n\ +command=/ranchimallflo-api/py3.7/bin/hypercorn -w 1 -b 0.0.0.0:5009 wsgi:app\n\ +user=root\n\ +autostart=true\n\ +autorestart=true\n\ +stopasgroup=true\n\ +killasgroup=true\n\ +stderr_logfile=/var/log/ranchimallflo-api/ranchimallflo-api.err.log\n\ +stdout_logfile=/var/log/ranchimallflo-api/ranchimallflo-api.out.log" >> ranchimallflo-api.conf \ No newline at end of file