Python-based Uvicorn centralized server for ANMS
Copyright (C) 2022 The Johns Hopkins University Applied Physics Laboratory LLC.
- pip install virtualenv
- python3 -m virtualenv venv
- source venv/bin/activate
- pip3 install --upgrade pip pip-tools
- pip-compile pyproject.toml
- pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org -r requirements.txt
During development the system can be started with python3 run_dev.py
.
A default set of configuration values are defined in anms/shared/config.py
. Configuration items may be overridden via
a configuration file or by setting environment variables. Configuration items read from the configuration file override
the default values and items read from environment variables override both those defined in a configuration file and the
default configuration.
When running locally, the argument -c LocalConfig
can be used to set hostnames to localhost
A configuration file named config.yaml
may be placed in the anms
directory. This file is expected to contain
configuration in YAML file format (e.g. NAME: VALUE
). Configuration items defined in this file will override the
default configuration value with a matching name.
Environment variables with the prefix "ANMS_CORE_" are applied as configuration overrides. Environment variables will override the file-based and default configuration value with a matching name (excluding the prefix). For example, to override the configuration item SERVER_HOST, set an environment variable named ANMS_CORE_SERVER_HOST.