Add kubernetes files and shell scripts for test deployment
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
FROM python:3.8-slim
|
||||
COPY . /app
|
||||
WORKDIR /app
|
||||
RUN pip install -r requirements.txt
|
||||
ENV PORT 5000
|
||||
EXPOSE 5000
|
||||
ENTRYPOINT [ "python" ]
|
||||
CMD [ "entity_ident.py" ]
|
||||
@@ -0,0 +1,38 @@
|
||||
import jsonify as jsonify
|
||||
from flask import Flask
|
||||
from flask_pymongo import PyMongo
|
||||
|
||||
# make sure mongoDB (container) is running and accessible
|
||||
|
||||
# see https://flask-pymongo.readthedocs.io/en/latest/
|
||||
|
||||
app = Flask(__name__)
|
||||
#app.config["MONGO_URI"] = "mongodb://localhost:27017/myDatabase"
|
||||
#mongo = PyMongo(app)
|
||||
|
||||
#mongo.db.test.insert_one({'_id': 0, 'foo': {'test': 'this'}})
|
||||
#mongo.db.test.insert_one({'_id': 1, 'suu': 'sar'})
|
||||
|
||||
|
||||
#@app.route("/")
|
||||
#def home_page():
|
||||
# test_results = mongo.db.test.find()
|
||||
# results = []
|
||||
# try:
|
||||
# while True:
|
||||
# result = test_results.next()
|
||||
# results.append(result)
|
||||
# except StopIteration:
|
||||
# pass
|
||||
|
||||
#return str(results)
|
||||
|
||||
@app.route("/")
|
||||
def index():
|
||||
return str("Welcome to Tasks app! I am running inside pod!")
|
||||
|
||||
#if __name__ == '__main__':
|
||||
# app.run()
|
||||
|
||||
if __name__ == '__main__':
|
||||
app.run(host='0.0.0.0')
|
||||
@@ -0,0 +1,4 @@
|
||||
pika
|
||||
flask
|
||||
Flask-PyMongo
|
||||
jsonify
|
||||
Reference in New Issue
Block a user