Commit a4dca2e1 authored by jackie / Andrea Ida Malkah Klaura's avatar jackie / Andrea Ida Malkah Klaura
Browse files

make http schema configurable through mode

parent 49102bc2
......@@ -60,12 +60,18 @@ set_config_dashboard () {
# and also write the global .env file for docker-compose
init_common () {
echo "Reading required variables from aura-config.yaml"
MODE="$(docker run --rm -v "${PWD}"/aura-config.yaml:/workdir/aura-config.yaml mikefarah/yq eval '.aura.mode' aura-config.yaml)"
# by default https should be used except for local dev mode
# TODO: create getopts options to override this setting for testing purposes
if [ "$MODE" = "dev" ]; then
HTTP_SCHEMA="http"
else
HTTP_SCHEMA="https"
fi
AURA_DOMAIN="$(docker run --rm -v "${PWD}"/aura-config.yaml:/workdir/aura-config.yaml mikefarah/yq eval '.aura.domain' aura-config.yaml)"
USERNAME="$(docker run --rm -v "${PWD}"/aura-config.yaml:/workdir/aura-config.yaml mikefarah/yq eval '.aura.admin.username' aura-config.yaml)"
USERMAIL="$(docker run --rm -v "${PWD}"/aura-config.yaml:/workdir/aura-config.yaml mikefarah/yq eval '.aura.admin.email' aura-config.yaml)"
DEBUG="$(docker run --rm -v "${PWD}"/aura-config.yaml:/workdir/aura-config.yaml mikefarah/yq eval '.aura.debug' aura-config.yaml)"
# TODO: set this depending on config (should be http only for local systems)
HTTP_SCHEMA="http"
echo "Reading steering database config from aura-config.yaml"
STEERING_DB_PASS="$(docker run --rm -v "${PWD}"/aura-config.yaml:/workdir/aura-config.yaml mikefarah/yq eval '.aura.steering.db_pass' aura-config.yaml)"
STEERING_DB_USER="$(docker run --rm -v "${PWD}"/aura-config.yaml:/workdir/aura-config.yaml mikefarah/yq eval '.aura.steering.db_user' aura-config.yaml)"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment