mirror of
https://github.com/bvanroll/cicdTest.git
synced 2025-08-29 12:02:47 +00:00
build test
This commit is contained in:
15
serverA/__init__.py
Normal file
15
serverA/__init__.py
Normal file
@@ -0,0 +1,15 @@
|
||||
from flask import Flask
|
||||
import requests
|
||||
|
||||
app = Flask(__name__)
|
||||
|
||||
URL = "http://service"
|
||||
|
||||
|
||||
@app.route('/')
|
||||
def doRequest():
|
||||
return requests.get(URL).json()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
app.run(debug=True, host="0.0.0.0")
|
10
serverA/dockerfile
Normal file
10
serverA/dockerfile
Normal file
@@ -0,0 +1,10 @@
|
||||
from python:3.7
|
||||
|
||||
copy . /app
|
||||
workdir /app
|
||||
|
||||
run pip install -r requirements.txt
|
||||
expose 5000
|
||||
entrypoint [ "python" ]
|
||||
|
||||
cmd [ "app.py" ]
|
2
serverA/requirements.txt
Normal file
2
serverA/requirements.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
Flask
|
||||
requests
|
Reference in New Issue
Block a user