Mongoose server changes

This commit is contained in:
Vivek Teega 2022-07-17 18:40:21 +05:30
parent 9439cc238e
commit 3698caee7b
5 changed files with 10 additions and 4 deletions

View File

@ -47,7 +47,6 @@ RUN echo "dbfolder = '/data' \nsse_pubKey = '02b68a7ba52a499b4cb664033f511a14b0b
WORKDIR ../ WORKDIR ../
RUN git clone https://github.com/ranchimall/floscout.git RUN git clone https://github.com/ranchimall/floscout.git
WORKDIR floscout WORKDIR floscout
COPY example .
RUN sed -i "s|window.tokenapiUrl = 'http://0.0.0.0:6012'|window.tokenapiUrl = $FLOAPIURL|" /floscout/index.html RUN sed -i "s|window.tokenapiUrl = 'http://0.0.0.0:6012'|window.tokenapiUrl = $FLOAPIURL|" /floscout/index.html
WORKDIR ../ WORKDIR ../
@ -73,6 +72,7 @@ RUN touch /var/log/floscout/floscout.out.log
RUN mkdir /data RUN mkdir /data
WORKDIR / WORKDIR /
COPY 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,8 +6,8 @@ VCFLAGS = /nologo /W3 /O2 /I../.. $(DEFS) $(EXTRA) /link /incremental:no /machin
VC98 = docker run -it --rm -e Tmp=. -v $(ROOT):$(ROOT) -w $(CURDIR) mdashnet/vc98 VC98 = docker run -it --rm -e Tmp=. -v $(ROOT):$(ROOT) -w $(CURDIR) mdashnet/vc98
LIN = docker run -it --rm -v $(ROOT):$(ROOT) -w $(CURDIR) mdashnet/cc2 LIN = docker run -it --rm -v $(ROOT):$(ROOT) -w $(CURDIR) mdashnet/cc2
all: $(PROG) #all: $(PROG)
$(RUN) ./$(PROG) $(ARGS) # $(RUN) ./$(PROG) $(ARGS)
$(PROG): main.c Makefile $(PROG): main.c Makefile
$(CC) ../../mongoose.c main.c -I../.. $(CFLAGS) -o $@ $(CC) ../../mongoose.c main.c -I../.. $(CFLAGS) -o $@

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:6201"; static const char *s_listening_address = "http://0.0.0.0:6012";
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";

6
run.sh
View File

@ -23,6 +23,12 @@ then
ls /data ls /data
fi fi
# prepare binary
cd /mongoose-server/examples/http-server
make
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 ./floscout/example