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

[WIP] add aura config file and run script

parent 46d0c0e8
aura:
# Currently there is only a production mode available. The idea is though
# in the long rung to be able to switch between 'prod' and 'dev'
mode: prod
domain: aura.local
admin:
username: jackie
email: jackie@tantemalkah.at
steering:
# The timezone of this server. For a list of all available tz database names see
# https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
# (default: Europe/Vienna)
#TIME_ZONE: Europe/Vienna
# The language code for the localization of this server. For a list of available
# codes see http://www.i18nguy.com/unicode/language-identifiers.html
# (default: de)
#LANGUAGE_CODE: de
dashboard:
# How many timeslots should be shown by default? (has to be a string)
VUE_APP_TIMESLOT_FILTER_DEFAULT_NUMSLOTS: 10
# After how many shows to switch to the compact show selector vs the dropdown
VUE_APP_SHOW_THRESHOLD: 10
# For how many days from now should timeslots be fetched by default? (has to be an int)
VUE_APP_TIMESLOT_FILTER_DEFAULT_DAYS: 60
#!/bin/bash
init_steering () {
USERNAME="$(docker run --rm -v "${PWD}":/workdir mikefarah/yq eval '.aura.admin.username' aura-config.yaml)"
USERMAIL="$(docker run --rm -v "${PWD}":/workdir mikefarah/yq eval '.aura.admin.email' aura-config.yaml)"
docker-compose start steering-django
docker exec steering-django python manage.py migrate
docker exec steering-django sh -c 'python manage.py loaddata fixtures/*/*.json'
echo "A steering superuser account for $USERNAME <$USERMAIL> will be created."
echo "Please provide a (strong) password."
docker exec steering-django python manage.py createsuperuser --username "$USERNAME" --email "$USERMAIL"
docker exec steering-django python manage.py creatersakey
DASHBOARD_CLIENT_ID="$(docker exec steering-django python manage.py create_oidc_client -r "id_token token" --no-require-consent -i -u "http://aura.local/oidc_callback.html" -u "http://aura.local/oidc_callback_silentRenew.html" -p "http://aura.local" dashboard public)"
TANK_OIDC_DETAILS="$(docker exec steering-django python manage.py create_oidc_client -r "code" -i -u "http://aura.local/tank/auth/oidc/callback" -p "http://aura.local" dashboard confidential)"
TANK_CLIENT_ID="$(echo $TANK_OIDC_DETAILS | cut -d ' ' -f 1)"
TANK_CLIENT_SECRET="$(echo $TANK_OIDC_DETAILS | cut -d ' ' -f 2)"
}
init_tank () {
echo "todo: implement tank init"
}
init_dashboard () {
echo "todo: implement dashboard init"
}
start_webserver () {
docker-compose start aura-web
# TODO: implement letsencrypt for prod setup
}
init_steering
init_tank
init_dasboard
start_webserver
\ No newline at end of file
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