Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| eded60c380 | |||
| cfb8c0213a | |||
|
ae1c26945e
|
|||
| 092eb465bf | |||
|
ceda986b0b
|
|||
|
efcb35bd4a
|
|||
|
b72e7c454e
|
|||
|
e5443e3150
|
|||
| ab7d6988a3 |
@ -1,5 +1,5 @@
|
||||
TYPE=authentik
|
||||
TIMEOUT=900
|
||||
#TIMEOUT=900
|
||||
ENABLE_AUTO_UPDATE=true
|
||||
POST_DEPLOY_CMDS="worker set_admin_pass"
|
||||
# Example values for post deploy cmds: "worker set_admin_pass|worker apply_blueprints|worker add_applications"
|
||||
|
||||
41
abra.sh
41
abra.sh
@ -50,8 +50,8 @@ import_user() {
|
||||
fi
|
||||
source_file=$1
|
||||
filename=$(basename $source_file)
|
||||
abra app cp $APP_NAME $source_file worker:/tmp/
|
||||
abra app cmd -T $APP_NAME worker _import_user $filename
|
||||
abra app cp -C $APP_NAME $source_file worker:/tmp/
|
||||
abra app cmd -C -T $APP_NAME worker _import_user $filename
|
||||
}
|
||||
|
||||
_import_user() {
|
||||
@ -77,7 +77,7 @@ with open('/tmp/$1', newline='') as file:
|
||||
else:
|
||||
group = Group.objects.create(name=group_name)
|
||||
print(f'{group_name} created')
|
||||
group.users.add(new_user)
|
||||
new_user.groups.add(group)
|
||||
print(f'add {username} to group {group_name}')
|
||||
""" 2>&1 | quieten
|
||||
}
|
||||
@ -216,6 +216,35 @@ for name, details in applications.items():
|
||||
""" 2>&1 | quieten
|
||||
}
|
||||
|
||||
# This function adds one application with its name, slug and group if passed
|
||||
add_single_application() {
|
||||
if [ -z "$2" ]; then
|
||||
echo "Usage: ... add_single_application <name> <url> <group>"
|
||||
exit 1
|
||||
fi
|
||||
/manage.py shell -c """
|
||||
import json
|
||||
import os
|
||||
name = '$1'
|
||||
url = '$2'
|
||||
app = Application.objects.filter(name=name).first()
|
||||
if not app:
|
||||
app = Application()
|
||||
app.name = name
|
||||
app.slug = name.replace(' ', '-')
|
||||
app.meta_launch_url = url
|
||||
group = '$3'
|
||||
if group:
|
||||
app.group = group
|
||||
print(f'Add {name}: {url} in group: {group}')
|
||||
else:
|
||||
app.group = ''
|
||||
print(f'Add {name}: {url}')
|
||||
app.open_in_new_tab = True
|
||||
app.save()
|
||||
""" 2>&1 | quieten
|
||||
}
|
||||
|
||||
## This function is for renaming apps - usage: rename "old name" "new name"
|
||||
rename() {
|
||||
/manage.py shell -c """
|
||||
@ -235,7 +264,7 @@ else:
|
||||
quieten() {
|
||||
# 'SyntaxWarning|version_regex|"http\['
|
||||
# is a workaround to get rid of some verbose syntax warnings, this might be fixed with another version
|
||||
grep -Pv '"level": "(info|debug)"|SyntaxWarning|version_regex|"http\[|RuntimeWarning:'
|
||||
grep -Pv '"level": "(info|debug)"|SyntaxWarning|version_regex|"http\[|RuntimeWarning:|### authentik shell|### Node| objects imported automatically|^$'
|
||||
}
|
||||
|
||||
add_email_templates() {
|
||||
@ -254,8 +283,8 @@ set_icons() {
|
||||
file_path=$(eval echo $(echo $icon | cut -d ":" -f2))
|
||||
file=$(basename $file_path)
|
||||
echo copy icon $file_path for $app
|
||||
abra app cp $APP_NAME $file_path app:/media/
|
||||
abra app cmd -T $APP_NAME app set_app_icon $app /media/$file
|
||||
abra app cp -C $APP_NAME $file_path app:/media/
|
||||
abra app cmd -C -T $APP_NAME app set_app_icon $app /media/$file
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
@ -69,11 +69,11 @@ services:
|
||||
- "traefik.http.routers.${STACK_NAME}.middlewares=${STACK_NAME}-redirect,${STACK_NAME}-frameOptions,${STACK_NAME}-redirect"
|
||||
- "traefik.http.middlewares.${STACK_NAME}-frameOptions.headers.customFrameOptionsValue=SAMEORIGIN"
|
||||
- "traefik.http.middlewares.${STACK_NAME}-frameOptions.headers.contentSecurityPolicy=frame-ancestors ${X_FRAME_OPTIONS_ALLOW_FROM}"
|
||||
- "coop-cloud.${STACK_NAME}.version=10.1.0+2025.10.2"
|
||||
- "coop-cloud.${STACK_NAME}.version=10.1.2+2025.10.2"
|
||||
- "traefik.http.middlewares.${STACK_NAME}-redirect.redirectregex.regex=^https://(${REDIRECTS})/(.*)"
|
||||
- "traefik.http.middlewares.${STACK_NAME}-redirect.redirectregex.replacement=https://${DOMAIN}/$${2}"
|
||||
- "traefik.http.middlewares.${STACK_NAME}-redirect.redirectregex.permanent=true"
|
||||
- "coop-cloud.${STACK_NAME}.timeout=${TIMEOUT:-120}"
|
||||
- "coop-cloud.${STACK_NAME}.timeout=${TIMEOUT}"
|
||||
|
||||
worker:
|
||||
image: ghcr.io/goauthentik/server:2025.10.2
|
||||
|
||||
3
icons/poll.svg
Normal file
3
icons/poll.svg
Normal file
@ -0,0 +1,3 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M6.75 3.00464V5.25464M17.25 3.00464V5.25464M3 18.7546V7.50464C3 6.262 4.00736 5.25464 5.25 5.25464H18.75C19.9926 5.25464 21 6.262 21 7.50464V18.7546M3 18.7546C3 19.9973 4.00736 21.0046 5.25 21.0046H18.75C19.9926 21.0046 21 19.9973 21 18.7546M3 18.7546V11.2546C3 10.012 4.00736 9.00464 5.25 9.00464H18.75C19.9926 9.00464 21 10.012 21 11.2546V18.7546M12 12.7546H12.0075V12.7621H12V12.7546ZM12 15.0046H12.0075V15.0121H12V15.0046ZM12 17.2546H12.0075V17.2621H12V17.2546ZM9.75 15.0046H9.7575V15.0121H9.75V15.0046ZM9.75 17.2546H9.7575V17.2621H9.75V17.2546ZM7.5 15.0046H7.5075V15.0121H7.5V15.0046ZM7.5 17.2546H7.5075V17.2621H7.5V17.2546ZM14.25 12.7546H14.2575V12.7621H14.25V12.7546ZM14.25 15.0046H14.2575V15.0121H14.25V15.0046ZM14.25 17.2546H14.2575V17.2621H14.25V17.2546ZM16.5 12.7546H16.5075V12.7621H16.5V12.7546ZM16.5 15.0046H16.5075V15.0121H16.5V15.0046Z" stroke="#0F172A" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.0 KiB |
Reference in New Issue
Block a user