From 3967ee33127a131d26728a5a4a47c0567ac22830 Mon Sep 17 00:00:00 2001 From: Divyansh Bhardwaj <87605149+Dbhardwaj99@users.noreply.github.com> Date: Wed, 18 May 2022 23:00:20 +0530 Subject: [PATCH] added a shell script to run mongoose server Hope this works --- Dockerfile | 3 ++- mongoose.sh | 5 +++++ run.sh | 3 ++- 3 files changed, 9 insertions(+), 2 deletions(-) create mode 100755 mongoose.sh diff --git a/Dockerfile b/Dockerfile index e81f088..caac1de 100644 --- a/Dockerfile +++ b/Dockerfile @@ -62,6 +62,7 @@ WORKDIR ../ RUN git clone https://github.com/ranchimall/floscout.git WORKDIR floscout COPY example . +COPY mongoose.sh . WORKDIR ../ # Supervisor configurations @@ -69,7 +70,7 @@ WORKDIR ../ ## Ranchimallflo configuration WORKDIR /etc/supervisor/conf.d/ RUN touch ftt-ranchimallflo.conf -RUN echo "[supervisord] \nnodaemon=true\n[program:flo-token-tracking]\ndirectory=/flo-token-tracking\ncommand=python3 tracktokens_smartcontracts.py --reset\nuser=root\nautostart=true\nautorestart=false\nstopasgroup=true\nkillasgroup=true\nstderr_logfile=/var/log/flo-token-tracking/flo-token-tracking.err.log\nstdout_logfile=/var/log/flo-token-tracking/flo-token-tracking.out.log\n[program:ranchimallflo-api]\ndirectory=/ranchimallflo-api\ncommand=hypercorn -w 1 -b 0.0.0.0:5009 wsgi:app\nuser=root\nautostart=true\nautorestart=true\nstopasgroup=true\nkillasgroup=true\nstderr_logfile=/var/log/ranchimallflo-api/ranchimallflo-api.err.log \nstdout_logfile=/var/log/ranchimallflo-api/ranchimallflo-api.out.log\n[program:floscout]\ndirectory=/floscout\ncommand=./example\nuser=root\nautostart=true\nautorestart=false\nstopasgroup=true\nkillasgroup=true\nstderr_logfile=/var/log/floscout/floscout.err.log\nstdout_logfile=/var/log/floscout/floscout.out.log" >> ftt-ranchimallflo.conf +RUN echo "[supervisord] \nnodaemon=true\n[program:flo-token-tracking]\ndirectory=/flo-token-tracking\ncommand=python3 tracktokens_smartcontracts.py --reset\nuser=root\nautostart=true\nautorestart=false\nstopasgroup=true\nkillasgroup=true\nstderr_logfile=/var/log/flo-token-tracking/flo-token-tracking.err.log\nstdout_logfile=/var/log/flo-token-tracking/flo-token-tracking.out.log\n[program:ranchimallflo-api]\ndirectory=/ranchimallflo-api\ncommand=hypercorn -w 1 -b 0.0.0.0:5009 wsgi:app\nuser=root\nautostart=true\nautorestart=true\nstopasgroup=true\nkillasgroup=true\nstderr_logfile=/var/log/ranchimallflo-api/ranchimallflo-api.err.log \nstdout_logfile=/var/log/ranchimallflo-api/ranchimallflo-api.out.log\n[program:floscout]\ndirectory=/floscout\ncommand=mongoose.sh\nuser=root\nautostart=true\nautorestart=false\nstopasgroup=true\nkillasgroup=true\nstderr_logfile=/var/log/floscout/floscout.err.log\nstdout_logfile=/var/log/floscout/floscout.out.log" >> ftt-ranchimallflo.conf RUN mkdir /var/log/flo-token-tracking RUN touch /var/log/flo-token-tracking/flo-token-tracking.err.log RUN touch /var/log/flo-token-tracking/flo-token-tracking.out.log diff --git a/mongoose.sh b/mongoose.sh new file mode 100755 index 0000000..36aca1a --- /dev/null +++ b/mongoose.sh @@ -0,0 +1,5 @@ +#!/bin/bash +cd /floscout + +echo "mongoose server is up..." +./example \ No newline at end of file diff --git a/run.sh b/run.sh index 1d4485d..ac9e649 100644 --- a/run.sh +++ b/run.sh @@ -2,4 +2,5 @@ cd /etc/supervisor/conf.d/ echo "running..." -supervisord -c /etc/supervisor/conf.d/ftt-ranchimallflo.conf \ No newline at end of file +supervisord -c /etc/supervisor/conf.d/ftt-ranchimallflo.conf +./floscout/example \ No newline at end of file