diff --git a/Dockerfile b/Dockerfile index 8cfcdd5..407c4d0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -47,7 +47,6 @@ RUN echo "dbfolder = '/data' \nsse_pubKey = '02b68a7ba52a499b4cb664033f511a14b0b WORKDIR ../ RUN git clone https://github.com/ranchimall/floscout.git WORKDIR floscout -COPY example . RUN sed -i "s|window.tokenapiUrl = 'http://0.0.0.0:6012'|window.tokenapiUrl = $FLOAPIURL|" /floscout/index.html WORKDIR ../ @@ -73,6 +72,7 @@ RUN touch /var/log/floscout/floscout.out.log RUN mkdir /data WORKDIR / +COPY mongoose-server COPY run.sh . RUN chmod +x run.sh ENTRYPOINT ["sh","/run.sh"] diff --git a/mongoose-server/examples/http-server/Makefile b/mongoose-server/examples/http-server/Makefile index 528fc62..9159b27 100644 --- a/mongoose-server/examples/http-server/Makefile +++ b/mongoose-server/examples/http-server/Makefile @@ -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 LIN = docker run -it --rm -v $(ROOT):$(ROOT) -w $(CURDIR) mdashnet/cc2 -all: $(PROG) - $(RUN) ./$(PROG) $(ARGS) +#all: $(PROG) +# $(RUN) ./$(PROG) $(ARGS) $(PROG): main.c Makefile $(CC) ../../mongoose.c main.c -I../.. $(CFLAGS) -o $@ diff --git a/mongoose-server/examples/http-server/example b/mongoose-server/examples/http-server/example deleted file mode 100755 index f1edb20..0000000 Binary files a/mongoose-server/examples/http-server/example and /dev/null differ diff --git a/mongoose-server/examples/http-server/main.c b/mongoose-server/examples/http-server/main.c index 19d948e..fa2c48d 100644 --- a/mongoose-server/examples/http-server/main.c +++ b/mongoose-server/examples/http-server/main.c @@ -6,7 +6,7 @@ static const char *s_debug_level = "2"; 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_ssi_pattern = "#.html"; diff --git a/run.sh b/run.sh index e9cd866..f8ab192 100755 --- a/run.sh +++ b/run.sh @@ -23,6 +23,12 @@ then ls /data fi +# prepare binary +cd /mongoose-server/examples/http-server +make +chmod +x example +cp example /floscout + echo "running..." supervisord -c /etc/supervisor/conf.d/ftt-ranchimallflo.conf ./floscout/example