diff --git a/.env_ows_root b/.env_ows_root index bc3ccc514..044f908bc 100644 --- a/.env_ows_root +++ b/.env_ows_root @@ -1,24 +1,42 @@ # Set some default vars, you can overwrite these by creating env vars # Example docker env file for OWS instance with (multi-file) configuration. -AWS_REGION=ap-southeast-2 +################ +# ODC DB Config +# ############## DB_HOSTNAME=postgres DB_PORT=5434 DB_USERNAME=opendatacubeusername DB_PASSWORD=opendatacubepassword DB_DATABASE=opendatacube -OWS_CFG_FILE=ows_refactored/ows_root_cfg.py -# OWS_CFG_FOLDER config enables mounting an external CFG folder -OWS_CFG_FOLDER=~/dea-config/dev/services/wms/ows_refactored -# OWS_CFG_CONTAINER_FOLDER defines the mount inside docker container -OWS_CFG_CONTAINER_FOLDER=/env/config/ows_refactored + +################# +# OWS CFG Config +################# +PYTHONPATH=/env/config +DATACUBE_OWS_CFG=ows_refactored.ows_root_cfg.ows_cfg + +################ +# Docker Volume +################ +# OWS_CFG_DIR config enables mounting an external CFG folder +OWS_CFG_DIR=~/dea-config/dev/services/wms/ows_refactored +# OWS_CFG_MOUNT_DIR defines the mount inside docker container +OWS_CFG_MOUNT_DIR=/env/config/ows_refactored + +################ +# AWS S3 Config +################ +AWS_REGION=ap-southeast-2 AWS_NO_SIGN_REQUEST=yes AWS_S3_ENDPOINT= + +################### +# Dev Tools Config +################### # If you want to use pydev for interactive debugging PYDEV_DEBUG= # Will not work with pydev # Note that FLASK_ENV is now deprecated. FLASK_DEBUG= prometheus_multiproc_dir=/tmp -PYTHONPATH=/env/config -DATACUBE_OWS_CFG=ows_refactored.ows_root_cfg.ows_cfg SENTRY_DSN= diff --git a/.env_simple b/.env_simple index 5d4fe003f..fa2e5ea7a 100644 --- a/.env_simple +++ b/.env_simple @@ -1,24 +1,43 @@ # Example docker env file for OWS instance with (a single file) configuration. # Set some default vars, you can overwrite these by creating env vars -AWS_REGION=ap-southeast-2 + +################ +# ODC DB Config +# ############## DB_HOSTNAME=postgres DB_PORT=5432 DB_USERNAME=opendatacubeusername DB_PASSWORD=opendatacubepassword DB_DATABASE=opendatacube -OWS_CFG_FILE=config/ows_test_cfg.py -# OWS_CFG_FOLDER config enables mounting an external CFG folder -OWS_CFG_FOLDER=./integration_tests/cfg -# OWS_CFG_CONTAINER_FOLDER defines the mount inside docker container -OWS_CFG_CONTAINER_FOLDER=/env/config + +################# +# OWS CFG Config +################# +DATACUBE_OWS_CFG=config.ows_test_cfg.ows_cfg +PYTHONPATH=/env + +################ +# Docker Volume +################ +# OWS_CFG_DIR config enables mounting an external CFG folder +OWS_CFG_DIR=./integration_tests/cfg +# OWS_CFG_MOUNT_DIR defines the mount inside docker container +OWS_CFG_MOUNT_DIR=/env/config + +################ +# AWS S3 Config +################ +AWS_REGION=ap-southeast-2 AWS_NO_SIGN_REQUEST=yes AWS_S3_ENDPOINT= + +################### +# Dev Tools Config +################### # If you want to use pydev for interactive debugging PYDEV_DEBUG= # Will not work with pydev # Note FLASK_ENV is now deprecated. FLASK_DEBUG= prometheus_multiproc_dir=/tmp -PYTHONPATH=/env -DATACUBE_OWS_CFG=config.ows_test_cfg.ows_cfg SENTRY_DSN= diff --git a/complementary_config_test/.env_complementary_config_dea_dev b/complementary_config_test/.env_complementary_config_dea_dev index b3ff91537..758c3c7cd 100644 --- a/complementary_config_test/.env_complementary_config_dea_dev +++ b/complementary_config_test/.env_complementary_config_dea_dev @@ -1,22 +1,42 @@ # Set some default vars, you can overwrite these by creating env vars # Example docker env file for OWS instance with (multi-file) configuration. -AWS_REGION=ap-southeast-2 +################ +# ODC DB Config +# ############## DB_HOSTNAME=postgres -DB_PORT=5432 +DB_PORT=5434 DB_USERNAME=opendatacubeusername DB_PASSWORD=opendatacubepassword DB_DATABASE=opendatacube -OWS_CFG_FILE=ows_refactored/ows_root_cfg.py -# OWS_CFG_FOLDER config enables mounting an external CFG folder -OWS_CFG_FOLDER=/home/runner/work/datacube-ows/datacube-ows/dea-config/dev/services/wms/ows_refactored -# OWS_CFG_CONTAINER_FOLDER defines the mount inside docker container -OWS_CFG_CONTAINER_FOLDER=/env/config/ows_refactored + +################# +# OWS CFG Config +################# +PYTHONPATH=/env/config +DATACUBE_OWS_CFG=ows_refactored.ows_root_cfg.ows_cfg + +################ +# Docker Volume +################ +# OWS_CFG_DIR config enables mounting an external CFG folder +OWS_CFG_DIR=/home/runner/work/datacube-ows/datacube-ows/dea-config/dev/services/wms/ows_refactored +# OWS_CFG_MOUNT_DIR defines the mount inside docker container +OWS_CFG_MOUNT_DIR=/env/config/ows_refactored + +################ +# AWS S3 Config +################ +AWS_REGION=ap-southeast-2 AWS_NO_SIGN_REQUEST=yes AWS_S3_ENDPOINT= + +################### +# Dev Tools Config +################### # If you want to use pydev for interactive debugging PYDEV_DEBUG= # Will not work with pydev -FLASK_ENV=development +# Note that FLASK_ENV is now deprecated. +FLASK_DEBUG= prometheus_multiproc_dir=/tmp -PYTHONPATH=/env/config -DATACUBE_OWS_CFG=ows_refactored.ows_root_cfg.ows_cfg +SENTRY_DSN= diff --git a/docker-compose.yaml b/docker-compose.yaml index 91e58a5aa..7c263e346 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -23,8 +23,6 @@ services: DB_USERNAME: ${DB_USERNAME} DB_PASSWORD: ${DB_PASSWORD} DB_DATABASE: ${DB_DATABASE} - # Where the config file is (must match the volume mount) - WMS_CONFIG_PATH: ${OWS_CFG_CONTAINER_FOLDER}/${OWS_CFG_FILE} # Path from the PYTHONPATH to the config object (default PYTHONPATH is /env) PYTHONPATH: ${PYTHONPATH} DATACUBE_OWS_CFG: ${DATACUBE_OWS_CFG} @@ -39,7 +37,7 @@ services: PYDEV_DEBUG: "${PYDEV_DEBUG}" SENTRY_DSN: "${SENTRY_DSN}" volumes: - - ${OWS_CFG_FOLDER}:${OWS_CFG_CONTAINER_FOLDER} + - ${OWS_CFG_DIR}:${OWS_CFG_MOUNT_DIR} - ./docker/ows/wait-for-db:/usr/local/bin/wait-for-db - ./:/code/ - ./artifacts:/mnt/artifacts diff --git a/docs/environment_variables.rst b/docs/environment_variables.rst index 4347de13f..a7b28b506 100644 --- a/docs/environment_variables.rst +++ b/docs/environment_variables.rst @@ -118,14 +118,10 @@ for further details. environment variables exclusive for docker-compose -------------------------------------------------- -OWS_CFG_FILE: - for multiple files ows config structure, the root level ows config file path inside docker container - for single file ows config structure, the ows config file path inside docker container - -OWS_CFG_FOLDER: +OWS_CFG_DIR: path to a folder containing ows config files anywhere on the local machine -OWS_CFG_COUNTAINER_FOLDER: +OWS_CFG_MOUNT_DIR: path the OWS_CFG_FOLDER will mount to inside docker container PYTHONPATH: