- Add AUTH_PROVIDERS env var (comma-separated, default: file,atproto) to control which login methods are shown - Unified lichen.toml.tmpl with OIDC section gated on OIDC_ENABLED env - Entrypoint generates lichen.toml from base config only if not already present, preserving user customizations - Add compose.min.yml overlay for lichen-min image (without atproto/git/shell) - Entrypoint guards git commands for min image compatibility - Bump lichen-full and lichen-min images to 0.1.9 - Bump recipe version to 0.1.1+0.1.9
33 lines
1.1 KiB
Bash
33 lines
1.1 KiB
Bash
#!/bin/sh
|
|
set -e
|
|
|
|
# Disable bubblewrap sandbox — not supported inside Docker
|
|
rm -f /usr/bin/bwrap
|
|
|
|
# Install bash for lichen shell feature
|
|
apk add --no-cache bash > /dev/null 2>&1 || true
|
|
|
|
# Set git identity for auto-commit (git may not be present in min image)
|
|
if command -v git > /dev/null 2>&1; then
|
|
git config --global user.email "lichen@${LM_DASHBOARD_DOMAIN:-localhost}"
|
|
git config --global user.name "lichen"
|
|
fi
|
|
|
|
# Copy base config to lichen.toml only if user hasn't customized it
|
|
if [ ! -f /data/lichen.toml ]; then
|
|
# Convert comma-separated AUTH_PROVIDERS to TOML array
|
|
TOML_PROVIDERS=$(echo "${AUTH_PROVIDERS:-file,atproto}" | sed 's/[^,][^,]*/\"&\"/g')
|
|
{ echo "auth_providers = [$TOML_PROVIDERS]"; echo; cat /data/lichen-base.toml; } > /data/lichen.toml
|
|
fi
|
|
|
|
ADMIN_PASSWORD=$(cat /run/secrets/admin_password)
|
|
|
|
# create or update admin user password on every startup
|
|
if [ -f "/data/users/admin.toml" ]; then
|
|
lichen-server --multi user set-password admin --password "$ADMIN_PASSWORD" --root-dir /data
|
|
else
|
|
lichen-server --multi user add admin --password "$ADMIN_PASSWORD" --root-dir /data
|
|
fi
|
|
|
|
exec lichen-server --multi serve
|