Add stuff for docker + captain deployer

This commit is contained in:
Michal Kunc
2021-11-17 21:56:11 +01:00
parent 37cd6ddfda
commit 28f3d7e6cb
7 changed files with 166 additions and 1 deletions
+14
View File
@@ -0,0 +1,14 @@
FROM python:3
RUN python3 -m pip install poetry
EXPOSE 5000
WORKDIR /app
COPY db_explorer/ /app/
RUN poetry update
RUN poetry run pip install setuptools
ENTRYPOINT [ "poetry", "run" ]
CMD [ "gunicorn", "-b=0.0.0.0:5000", "db_explorer:app" ]
+1
View File
@@ -0,0 +1 @@
from db_explorer.app import app
-1
View File
@@ -37,7 +37,6 @@ def list_actions():
@app.route("/action/<name>")
def show_action(name):
item = mongo.db.action.find_one_or_404({"name": name})
print(item)
if item["data"]["actions"]["value"] == None:
if item["data"]["actionType"]["value"] == 'passive':
item['_action_icon'] = None
+1
View File
@@ -10,6 +10,7 @@ packages = [{include = "db_explorer"}]
python = "^3.8"
Flask = "^2.0.2"
Flask-PyMongo = "^2.3.0"
gunicorn = "^20.1.0"
[build-system]