Fixed bugs

This commit is contained in:
Vivek Teega 2022-07-18 11:28:05 +00:00
parent 3698caee7b
commit 00e5b47af4
3 changed files with 13 additions and 11 deletions

View File

@ -72,7 +72,8 @@ RUN touch /var/log/floscout/floscout.out.log
RUN mkdir /data RUN mkdir /data
WORKDIR / WORKDIR /
COPY mongoose-server RUN mkdir mongoose-server
COPY mongoose-server/ /mongoose-server
COPY run.sh . COPY run.sh .
RUN chmod +x run.sh RUN chmod +x run.sh
ENTRYPOINT ["sh","/run.sh"] ENTRYPOINT ["sh","/run.sh"]

View File

@ -6,7 +6,7 @@
static const char *s_debug_level = "2"; static const char *s_debug_level = "2";
static const char *s_root_dir = "."; static const char *s_root_dir = ".";
static const char *s_listening_address = "http://0.0.0.0:6012"; static const char *s_listening_address = "http://0.0.0.0:6200";
static const char *s_enable_hexdump = "no"; static const char *s_enable_hexdump = "no";
static const char *s_ssi_pattern = "#.html"; static const char *s_ssi_pattern = "#.html";

19
run.sh
View File

@ -1,8 +1,10 @@
#!/bin/bash #!/bin/bash
cd /etc/supervisor/conf.d/
sed -i "s|command=hypercorn -w 1 -b 0.0.0.0:6012 wsgi:app|command=hypercorn -w 1 -b $FLOAPIURL wsgi:app|" /etc/supervisor/conf.d/ftt-ranchimallflo.conf # prepare binary
sed -i "s|window.tokenapiUrl = 'https://ranchimallflo.duckdns.org'|window.tokenapiUrl = '$FLOAPIURL'|" /floscout/index.html cd /mongoose-server/examples/http-server
make
chmod +x example
cp example /floscout
if [ ! -z "$FLOSCOUT_BOOTSTRAP" ] && [ "$(cat /data/floscout-url.txt)" != "$FLOSCOUT_BOOTSTRAP" ] if [ ! -z "$FLOSCOUT_BOOTSTRAP" ] && [ "$(cat /data/floscout-url.txt)" != "$FLOSCOUT_BOOTSTRAP" ]
then then
@ -23,12 +25,11 @@ then
ls /data ls /data
fi fi
# prepare binary cd /etc/supervisor/conf.d/
cd /mongoose-server/examples/http-server sed -i "s|command=hypercorn -w 1 -b 0.0.0.0:6012 wsgi:app|command=hypercorn -w 1 -b $FLOAPIURL wsgi:app|" /etc/supervisor/conf.d/ftt-ranchimallflo.conf
make sed -i "s|window.tokenapiUrl = 'https://ranchimallflo.duckdns.org'|window.tokenapiUrl = '$FLOAPIURL'|" /floscout/index.html
chmod +x example
cp example /floscout
echo "running..." echo "running..."
supervisord -c /etc/supervisor/conf.d/ftt-ranchimallflo.conf supervisord -c /etc/supervisor/conf.d/ftt-ranchimallflo.conf
./floscout/example cd /floscout
./example