Skip to content

Commit

Permalink
Update ENV variables names
Browse files Browse the repository at this point in the history
  • Loading branch information
Bobronium committed Nov 29, 2024
1 parent 5b6f52b commit ec99138
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions packages/examples/cvat/exchange-oracle/src/.env.template
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,4 @@ PGP_PUBLIC_KEY_URL=

# Development
DEV_CVAT_IN_DOCKER=
DEV_CVAT_LOCAL_HOST=
12 changes: 6 additions & 6 deletions packages/examples/cvat/exchange-oracle/src/core/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,12 @@ def validate(cls) -> None:
raise Exception(" ".join([ex_prefix, str(ex)]))


class Development:
cvat_in_docker = bool(int(os.environ.get("DEV_CVAT_IN_DOCKER", "0")))
# might be `host.docker.internal` or `172.22.0.1` if CVAT is running in docker
cvat_local_host = os.environ.get("DEV_CVAT_LOCAL_HOST", "localhost")


class Environment(str, Enum):
PRODUCTION = "production"
DEVELOPMENT = "development"
Expand All @@ -313,12 +319,6 @@ def _missing_(cls, value: str) -> Optional["Environment"]:
return None


class Development:
cvat_in_docker = bool(int(os.environ.get("CVAT_IN_DOCKER", "0")))
# might be `host.docker.internal` or `172.22.0.1` if CVAT is running in docker
cvat_local_host = os.environ.get("CVAT_LOCAL_HOST", "localhost")


class Config:
debug = to_bool(os.environ.get("DEBUG", "false"))
port = int(os.environ.get("PORT", 8000))
Expand Down

0 comments on commit ec99138

Please sign in to comment.