add dashboard application links
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Moritz 2023-04-26 18:12:49 +02:00
parent 2937b6248c
commit 97fde96300
5 changed files with 37 additions and 6 deletions

View File

@ -1,7 +1,7 @@
TYPE=authentik
TIMEOUT=300
ENABLE_AUTO_UPDATE=true
POST_DEPLOY_CMDS="app set_admin_pass|worker apply_blueprints"
POST_DEPLOY_CMDS="worker set_admin_pass|worker apply_blueprints|worker add_applications"
LETS_ENCRYPT_ENV=production
DOMAIN=authentik.example.com
@ -71,3 +71,7 @@ COPY_ASSETS="$COPY_ASSETS icon.png|app:/web/dist/assets/icons/"
# SECRET_VIKUNJA_ID_VERSION=v1
# SECRET_VIKUNJA_SECRET_VERSION=v1
# APP_ICONS="$APP_ICONS vikunja:~/.abra/recipes/authentik/icons/vikunja.svg"
# APPLICATIONS='{"Calendar": "https://nextcloud.example.com/apps/calendar/", "Rallly":"https://rallly.example.cloud/"}'
# APP_ICONS="$APP_ICONS Calendar:~/.abra/recipes/authentik/icons/calendar.svg"
# APP_ICONS="$APP_ICONS Rallly:~/.abra/recipes/authentik/icons/rallly.png"

34
abra.sh
View File

@ -50,7 +50,7 @@ else:
key=key,
)
print('Created authentik-bootstrap-token')
"""
""" 2>&1 | quieten
}
rotate_db_pass() {
@ -62,8 +62,8 @@ apply_blueprints() {
enable_blueprint default/flow-default-authentication-flow.yaml
enable_blueprint default/flow-default-user-settings-flow.yaml
enable_blueprint default/flow-password-change.yaml
ak apply_blueprint 6_flow_invalidation.yaml
ak apply_blueprint 5_system_tenant.yaml
ak apply_blueprint 6_flow_invalidation.yaml 2>&1 | quieten
ak apply_blueprint 5_system_tenant.yaml 2>&1 | quieten
disable_blueprint default/flow-default-authentication-flow.yaml
disable_blueprint default/flow-default-user-settings-flow.yaml
disable_blueprint default/flow-password-change.yaml
@ -84,10 +84,34 @@ blueprint_path='$2'
blueprint = BlueprintInstance.objects.filter(path=blueprint_path).first()
blueprint.enabled = blueprint_state
print(f'{blueprint.name} enabled: {blueprint.enabled}')
"""
""" 2>&1 | quieten
}
add_applications(){
/manage.py shell -c """
import json
if '$APPLICATIONS' == '':
exit()
applications = json.loads('$APPLICATIONS')
for name, url in applications.items():
print(f'Add {name}: {url}')
app = Application.objects.filter(name=name).first()
if not app:
app = Application()
app.name = name
app.slug = name.replace(' ', '-')
app.meta_launch_url = url
app.open_in_new_tab = True
app.save()
""" 2>&1 | quieten
}
quieten(){
grep -v '{"event"'
}
set_icons(){
for icon in $APP_ICONS; do
app=$(echo $icon | cut -d ":" -f1)
@ -126,6 +150,6 @@ Flow.objects.filter(slug__in=delete_flows).delete()
Stage.objects.filter(flow=None).delete()
Prompt.objects.filter(promptstage=None).delete()
Tenant.objects.filter(default=True).delete()
"""
""" 2>&1 | quieten
apply_blueprints
}

View File

@ -27,6 +27,7 @@ x-env: &env
- EMAIL_TOKEN_EXPIRY_MINUTES
- DOMAIN
- LOGOUT_REDIRECT
- APPLICATIONS
version: '3.8'
services:

2
icons/calendar.svg Normal file
View File

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" version="1.1" xml:space="preserve" height="32" width="32" enable-background="new 0 0 595.275 311.111" y="0px" x="0px" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" viewBox="0 0 32 32"><rect rx="5" ry="5" height="32" width="32" y="-.0000052588" x="0" fill="#0082c9"/><g transform="matrix(.89286 0 0 .89286 520.21 -.19331)"><path fill="#fff" d="m-572.71 3.5765c-1.108 0-2 0.892-2 2v4c0 1.108 0.892 2 2 2s2-0.892 2-2v-4c0-1.108-0.892-2-2-2zm16 0c-1.108 0-2 0.892-2 2v4c0 1.108 0.892 2 2 2s2-0.892 2-2v-4c0-1.108-0.892-2-2-2zm-13 4v2c0 1.662-1.338 3-3 3s-3-1.338-3-3v-1.875c-1.728 0.44254-3 2.0052-3 3.875v16c0 2.216 1.784 4 4 4h20c2.216 0 4-1.784 4-4v-16c0-1.8698-1.272-3.4325-3-3.875v1.875c0 1.662-1.338 3-3 3s-3-1.338-3-3v-2h-10zm-5.9062 9h21.812c0.0554 0 0.0937 0.03835 0.0937 0.09375v11.812c0 0.0554-0.0384 0.09375-0.0937 0.09375h-21.812c-0.0554 0-0.0937-0.03835-0.0937-0.09375v-11.812c0-0.0554 0.0384-0.09375 0.0937-0.09375z"/></g></svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
icons/rallly.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB