Move inventory to new repo

This commit is contained in:
2023-06-16 13:52:49 +03:00
commit 2b8820d4d7
25 changed files with 1903 additions and 0 deletions

19
inventory-app/const.py Normal file
View File

@@ -0,0 +1,19 @@
import os
def getenv_in(key, *vals):
val = os.getenv(key)
if val not in vals:
raise ValueError("Got %s for %s, expected one of %s" % (repr(val), key, vals))
return val
def file_exists(path):
if not os.path.isfile(path):
raise ValueError("Required file %s not found" % path)
ENVIRONMENT_TYPE = getenv_in("ENVIRONMENT_TYPE", "DEV", "PROD")
SECRET_KEY = os.environ["SECRET_KEY"]
AWS_ENDPOINT_URL = os.environ["AWS_ENDPOINT_URL"]
INVENTORY_ASSETS_BASE_URL = os.environ["INVENTORY_ASSETS_BASE_URL"]
MONGO_URI = os.environ["MONGO_URI"]
MEMBERS_HOST = os.environ["MEMBERS_HOST"]