From a22876ca30012b6979c349884cd86b30fa25a966 Mon Sep 17 00:00:00 2001 From: beppe Date: Mon, 16 Mar 2020 12:16:22 +0100 Subject: [PATCH] submodule en src --- .DS_Store | Bin 0 -> 6148 bytes src/app.py | 24 ++++++++++++++++++++++++ src/dockerfile | 10 ++++++++++ src/readme.md | 1 + src/requirements.txt | 1 + src/test.txt | 8 ++++++++ 6 files changed, 44 insertions(+) create mode 100644 .DS_Store create mode 100644 src/app.py create mode 100644 src/dockerfile create mode 100644 src/readme.md create mode 100644 src/requirements.txt create mode 100644 src/test.txt diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..e5f001e2bc38fc9226348fec34e7bd7d96bfd9c7 GIT binary patch literal 6148 zcmeHKy-EW?5S~pg5K%Ox<@SP*H#oytSt!KHN|Rtza$fMKzc;Y(d2Fo2RvSTl0P!LG zW@kulxo9atW?=T)o1gu-?~dDBB67XkQJ1JgL~S@@V+F$k<2-xK8X8#xI$mQk?)Ha8 zKCM++U|AL5XP3}6jp>|jqUY!6wVKO|EE`OU0b=d1t%r~2jmMohKl(L4J*&JMt?-Jp zz') +def doRequest(path): + requ = +path + ' \n' + with open("test.txt", "a") as myfile: + myfile.write(requ) + return "None" + + +@app.route('/server-d/get') +def get(): + with open("test.txt", "r") as infile: + return 'we have something: ' + '\n '.join(infile.readlines()) + + +if __name__ == '__main__': + app.run(debug=True, host="0.0.0.0", port=6000) diff --git a/src/dockerfile b/src/dockerfile new file mode 100644 index 0000000..643443f --- /dev/null +++ b/src/dockerfile @@ -0,0 +1,10 @@ +from python:3.7 + +copy . /app +workdir /app + +run pip install -r requirements.txt +expose 7000 +entrypoint [ "python" ] + +cmd [ "app.py" ] \ No newline at end of file diff --git a/src/readme.md b/src/readme.md new file mode 100644 index 0000000..1d3c326 --- /dev/null +++ b/src/readme.md @@ -0,0 +1 @@ +dees is de mirror server \ No newline at end of file diff --git a/src/requirements.txt b/src/requirements.txt new file mode 100644 index 0000000..2077213 --- /dev/null +++ b/src/requirements.txt @@ -0,0 +1 @@ +Flask \ No newline at end of file diff --git a/src/test.txt b/src/test.txt new file mode 100644 index 0000000..567e458 --- /dev/null +++ b/src/test.txt @@ -0,0 +1,8 @@ +another request +another request +another request +another request +another request favicon.ico +another request +another request server-a +another request favicon.ico