Prepare for Kubernetes migration
All checks were successful
continuous-integration/drone Build is passing

This commit is contained in:
Lauri Võsandi 2022-12-17 12:46:39 +02:00
parent 1acc7e2ea9
commit 922ee388ea
4 changed files with 6 additions and 6 deletions

View File

@ -1,3 +1,2 @@
kind: template kind: template
load: docker.yaml load: docker-multiarch.yaml

View File

@ -1,4 +1,4 @@
FROM harbor.k-space.ee/k-space/microservice-base FROM harbor.k-space.ee/k-space/microservice-base
WORKDIR /app WORKDIR /app
COPY *.py ./ COPY app /app
CMD python doorboy.py CMD /app/doorboy-proxy.py

3
doorboy.py → app/doorboy-proxy.py Normal file → Executable file
View File

@ -1,10 +1,13 @@
#!/usr/bin/env python3
from sanic import Sanic from sanic import Sanic
from sanic.response import text, json from sanic.response import text, json
from sanic_prometheus import monitor
from motor.motor_asyncio import AsyncIOMotorClient from motor.motor_asyncio import AsyncIOMotorClient
import pymongo import pymongo
import os import os
app = Sanic(__name__) app = Sanic(__name__)
monitor(app).expose_endpoint()
DOORBOY_SECRET = os.environ["DOORBOY_SECRET"] DOORBOY_SECRET = os.environ["DOORBOY_SECRET"]
MONGO_URI = os.getenv("MONGO_URI", MONGO_URI = os.getenv("MONGO_URI",

View File

@ -1,2 +0,0 @@
sanic
motor