diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..3147abc Binary files /dev/null and b/.DS_Store differ diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..ee981f5 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "infra"] + path = infra + url = https://github.com/beppevanrolleghem/stage-infra diff --git a/infra b/infra new file mode 160000 index 0000000..e05b588 --- /dev/null +++ b/infra @@ -0,0 +1 @@ +Subproject commit e05b58851797eb8a31b6fb256b8f79af24c8774c diff --git a/src/app.py b/src/app.py new file mode 100644 index 0000000..53b95c6 --- /dev/null +++ b/src/app.py @@ -0,0 +1,17 @@ +from flask import Flask +from flask import jsonify +app = Flask(__name__) + + +@app.route('/') +def doRequest(): + data = { + "serverName": "serverB", + "version": "master", + "success": "true" + } + return jsonify(data) + + +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..b9692c2 --- /dev/null +++ b/src/dockerfile @@ -0,0 +1,10 @@ +from python:3.7 + +copy . /app +workdir /app + +run pip install -r requirements.txt +expose 6000 +entrypoint [ "python" ] + +cmd [ "app.py" ] \ 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/stage-infra b/stage-infra new file mode 160000 index 0000000..7938666 --- /dev/null +++ b/stage-infra @@ -0,0 +1 @@ +Subproject commit 7938666913047455c7864e47fca80700f22acd66