diff --git a/.drone.yml b/.drone.yml index d8980bc..c650ef9 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,3 +1,2 @@ kind: template -load: docker.yaml - +load: docker-multiarch.yaml diff --git a/Dockerfile b/Dockerfile index f29f9d8..0b55404 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ FROM harbor.k-space.ee/k-space/microservice-base WORKDIR /app -COPY *.py ./ -CMD python doorboy.py +COPY app /app +CMD /app/doorboy-proxy.py diff --git a/doorboy.py b/app/doorboy-proxy.py old mode 100644 new mode 100755 similarity index 96% rename from doorboy.py rename to app/doorboy-proxy.py index 1be672d..1153ab3 --- a/doorboy.py +++ b/app/doorboy-proxy.py @@ -1,10 +1,13 @@ +#!/usr/bin/env python3 from sanic import Sanic from sanic.response import text, json +from sanic_prometheus import monitor from motor.motor_asyncio import AsyncIOMotorClient import pymongo import os app = Sanic(__name__) +monitor(app).expose_endpoint() DOORBOY_SECRET = os.environ["DOORBOY_SECRET"] MONGO_URI = os.getenv("MONGO_URI", diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index ff9dbc1..0000000 --- a/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -sanic -motor