fedspendingtransparency/usaspending-api

View on GitHub
.env.template

Summary

Maintainability
Test Coverage
########################################################################################################################
# [TEMPLATE FOR] USER specific ENVIRONMENT variables for local environment
# After copying this file to ./.env these ENV VAR values will be read-in in two places
# (1) docker configuration
#     - Variables defined here will be substituted for variables like ${THIS_VAR} that exist in docker-compose.yml
#     - To see the interpolated config values in use, run:
#       > docker-compose config
#       or
#       > make docker-compose-config
# (2) Runtime env configuration via usaspending_api.config.* modules
#     - Variables defined here will override variables of the same name in default or env-specific
#       config data classes (e.g. DefaultConfig in default.py and/or LocalConfig local.py)
########################################################################################################################
# ==== [Python] ====
PYTHON_VERSION=3.8.16

# ==== [App] ====
# MATVIEW_SQL_DIR has to be inside of the project (check the docker-compose file)
MATVIEW_SQL_DIR=matview_sql
PROJECT_LOG_DIR=./usaspending_api/logs

# ==== [Django] ====
# Use env var to toggle Django's DEBUG mode for local docker envs
DJANGO_DEBUG=False

# ==== [Postgres] ====
# All values of USASPENDING_DB_* must match what is in DATABASE_URL if BOTH are given
DATABASE_URL=postgres://usaspending:usaspender@usaspending-db:5432/data_store_api
# Change USASPENDING_DB_HOST to host.docker.internal if you are running a local Postgres server on the host machine
# Otherwise leave as-is, so other docker containerized services will use the Postgres created by Compose.
USASPENDING_DB_HOST=usaspending-db
USASPENDING_DB_PORT=5432
USASPENDING_DB_USER=usaspending
USASPENDING_DB_PASSWORD=usaspender

# All values of BROKER_DB_* must match what is in DATA_BROKER_DATABASE_URL if BOTH are given
DATA_BROKER_DATABASE_URL=postgres://admin:root@dataact-broker-db:5432/data_store_api
# Configuration values for a connection string to a Broker database
#    Only necessary for some management commands
BROKER_DB_HOST=dataact-broker-db
BROKER_DB_PORT=5432
BROKER_DB_USER=admin
BROKER_DB_PASSWORD=root

# ==== [Elasticsearch] ====
# Where to connect to elasticsearch.
# All values of ES_* must match what is in ES_HOSTNAME if BOTH are given
# NOTE: DO NOT include trailing slash on ES_HOSTNAME url
ES_HOSTNAME=http://usaspending-es:9200
ES_HOST=usaspending-es
ES_PORT=9200

# ==== [Spark] ====
SPARK_MASTER_PORT=7077
SPARK_MASTER_WEBUI_PORT=4040
SPARK_HISTORY_SERVER_PORT=18080
# Should point to a path where data can be persisted beyond docker restarts, outside of the git source repository
# The specified directory needs to exist before Docker can mount it
SPARK_CLUSTER_DATA_DIR=${HOME}/Development/data/usaspending/docker/usaspending-spark
# Optionally uncomment these sql warehouse and hive metastore env vars to use the explicit locations specified below
# If NOT uncommented, config should fall back to matching values in
#   1) These vars' values in local.py LocalConfig directed at a spark-warehouse dir under the project root
#   2) docker-compose.yml not finding these env vars, would ALSO fall back to a spark-warehouse dir under the project root
#SPARK_SQL_WAREHOUSE_DIR=${SPARK_CLUSTER_DATA_DIR}/spark-warehouse
#HIVE_METASTORE_DERBY_DB_DIR=${SPARK_SQL_WAREHOUSE_DIR}/metastore_db
# Uncomment if on MacOS. See note here: https://github.com/fedspendingtransparency/usaspending-api#test-setup for below
#OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES

# ==== [AWS] ====
# AWS_PROFILE needs to be left defaulted to None in python if not intending to use it. No way to set it to None in the .env file
# Uncomment below and set to the profile desired IF you want to use an AWS_PROFILE
#AWS_PROFILE=

# ==== [MinIO] ====
MINIO_HOST=minio
MINIO_PORT=10001
MINIO_CONSOLE_PORT=10002
# Should point to a path where data can be persisted beyond docker restarts, outside of the git source repository
# The specified directory needs to exist before Docker can mount it
MINIO_DATA_DIR=${HOME}/Development/data/usaspending/docker/usaspending-s3