Docker file for remote usage!

This commit is contained in:
Julian M. Kunkel 2018-12-27 15:28:40 +00:00
parent 992f34773a
commit 19de76cbd6
4 changed files with 17 additions and 1 deletions

4
docker/Dockerfile Normal file
View File

@ -0,0 +1,4 @@
FROM ubuntu:18.04
WORKDIR /data
RUN apt-get update && apt-get install -y python3-flask python3-elasticsearch

2
docker/build.sh Executable file
View File

@ -0,0 +1,2 @@
#!/bin/bash
docker build -t textnavi:ubuntu .

10
docker/run.sh Executable file
View File

@ -0,0 +1,10 @@
#!/bin/bash
if [[ "$1" == "" ]] ; then
CMD="python3 ./webapp.py"
else
CMD=/bin/bash
fi
OPT="-it --rm -v $PWD/../:/data/"
docker run $OPT --expose=5000 -p 5000:5000 -h textnavi textnavi:ubuntu $CMD

View File

@ -278,4 +278,4 @@ def top_items_v3():
# #
########################################################################################################################
if __name__ == '__main__':
app.run()
app.run(host= '0.0.0.0')