Read cards endpoint uri from env
This commit is contained in:
		| @@ -11,6 +11,7 @@ app = Sanic(__name__) | |||||||
| monitor(app).expose_endpoint() | monitor(app).expose_endpoint() | ||||||
|  |  | ||||||
| DOORBOY_SECRET = os.environ["DOORBOY_SECRET"] | DOORBOY_SECRET = os.environ["DOORBOY_SECRET"] | ||||||
|  | CARD_URI = os.environ["CARD_URI"] | ||||||
| CARD_KUBE_GROUP = os.environ["CARD_KUBE_GROUP"] | CARD_KUBE_GROUP = os.environ["CARD_KUBE_GROUP"] | ||||||
| MONGO_URI = os.getenv("MONGO_URI", | MONGO_URI = os.getenv("MONGO_URI", | ||||||
|                       "mongodb://127.0.0.1:27017/default?replicaSet=rs0") |                       "mongodb://127.0.0.1:27017/default?replicaSet=rs0") | ||||||
| @@ -30,7 +31,7 @@ async def view_doorboy_uids(request): | |||||||
|         return text("how about no") |         return text("how about no") | ||||||
|  |  | ||||||
|     async with httpx.AsyncClient() as client: |     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 |             "group": CARD_KUBE_GROUP | ||||||
|         }) |         }) | ||||||
|     j = r.json() |     j = r.json() | ||||||
|   | |||||||
| @@ -26,5 +26,6 @@ services: | |||||||
|     environment: |     environment: | ||||||
|       DOORBOY_SECRET: "0123456789" |       DOORBOY_SECRET: "0123456789" | ||||||
|       CARD_KUBE_GROUP: "codemowers:admins" |       CARD_KUBE_GROUP: "codemowers:admins" | ||||||
|  |       CARD_URI: "https://inventory-app-72zn4.codemowers.ee/cards" | ||||||
|     build: |     build: | ||||||
|       context: . |       context: . | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user