From 63a8b9e5f7549b008a0cbd4b6af3a3834be9d56b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Madis=20M=C3=A4gi?= Date: Sun, 30 Jul 2023 13:17:14 +0300 Subject: [PATCH] Read cards endpoint uri from env --- app/doorboy-proxy.py | 3 ++- docker-compose.yml | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/doorboy-proxy.py b/app/doorboy-proxy.py index 1e803f0..b33ffe2 100755 --- a/app/doorboy-proxy.py +++ b/app/doorboy-proxy.py @@ -11,6 +11,7 @@ app = Sanic(__name__) monitor(app).expose_endpoint() DOORBOY_SECRET = os.environ["DOORBOY_SECRET"] +CARD_URI = os.environ["CARD_URI"] CARD_KUBE_GROUP = os.environ["CARD_KUBE_GROUP"] MONGO_URI = os.getenv("MONGO_URI", "mongodb://127.0.0.1:27017/default?replicaSet=rs0") @@ -30,7 +31,7 @@ async def view_doorboy_uids(request): return text("how about no") async with httpx.AsyncClient() as client: - r = await client.get("https://inventory-app-72zn4.codemowers.ee/cards", params={ + r = await client.get(CARD_URI, params={ "group": CARD_KUBE_GROUP }) j = r.json() diff --git a/docker-compose.yml b/docker-compose.yml index 9dda351..fdef453 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -26,5 +26,6 @@ services: environment: DOORBOY_SECRET: "0123456789" CARD_KUBE_GROUP: "codemowers:admins" + CARD_URI: "https://inventory-app-72zn4.codemowers.ee/cards" build: context: .