Skip to content

Commit

Permalink
remove legacy configs
Browse files Browse the repository at this point in the history
  • Loading branch information
pindge committed Nov 21, 2022
1 parent 1d37c34 commit 8fc14af
Show file tree
Hide file tree
Showing 5 changed files with 86 additions and 35 deletions.
34 changes: 26 additions & 8 deletions .env_ows_root
Original file line number Diff line number Diff line change
@@ -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=
35 changes: 27 additions & 8 deletions .env_simple
Original file line number Diff line number Diff line change
@@ -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=
40 changes: 30 additions & 10 deletions complementary_config_test/.env_complementary_config_dea_dev
Original file line number Diff line number Diff line change
@@ -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=
4 changes: 1 addition & 3 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand All @@ -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
Expand Down
8 changes: 2 additions & 6 deletions docs/environment_variables.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 8fc14af

Please sign in to comment.