Skip to content

Latest commit

 

History

History
61 lines (45 loc) · 2.59 KB

README.md

File metadata and controls

61 lines (45 loc) · 2.59 KB

anms-core

Python-based Uvicorn centralized server for ANMS

Copyright

Copyright (C) 2022 The Johns Hopkins University Applied Physics Laboratory LLC.

Setting up environment and installing dependencies

  1. pip install virtualenv
  2. python3 -m virtualenv venv
  3. source venv/bin/activate
  4. pip3 install --upgrade pip pip-tools
  5. pip-compile pyproject.toml
  6. pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org -r requirements.txt

Running

During development the system can be started with python3 run_dev.py.

Configuration

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

Configuration by File

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.

Configuration by Environment Variables

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.