deployment templates for lichen
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

add DEFAULT_STORAGE_LIMIT support, default to atproto-only auth

- docker-compose: pass DEFAULT_STORAGE_LIMIT env var to container
- entrypoint: write default_storage_limit to lichen.toml on first run
- env.j2: template the new var from ansible inventory
- inventory.example: add lichen_default_storage_limit example ("5MB")

notplants 6730c096 42d00c64

+6
+1
ansible/inventory.example.yml
··· 9 9 lichen_admin_user: admin 10 10 # set lichen_admin_password via --extra-vars or ansible-vault 11 11 lichen_auth_providers: "file,atproto" 12 + lichen_default_storage_limit: "5MB" 12 13 lichen_deploy_dir: /srv/lichen 13 14 lichen_rust_log: info
+1
ansible/roles/lichen/templates/env.j2
··· 2 2 ADMIN_USER={{ lichen_admin_user }} 3 3 ADMIN_PASSWORD={{ lichen_admin_password }} 4 4 AUTH_PROVIDERS={{ lichen_auth_providers }} 5 + DEFAULT_STORAGE_LIMIT={{ lichen_default_storage_limit | default('') }} 5 6 RUST_LOG={{ lichen_rust_log }}
+1
docker-compose/docker-compose.yml
··· 13 13 - AUTH_PROVIDERS=${AUTH_PROVIDERS:-file,atproto} 14 14 - ADMIN_USER=${ADMIN_USER:-admin} 15 15 - ADMIN_PASSWORD=${ADMIN_PASSWORD} 16 + - DEFAULT_STORAGE_LIMIT=${DEFAULT_STORAGE_LIMIT:-} 16 17 - RUST_LOG=${RUST_LOG:-info} 17 18 volumes: 18 19 - lichen_data:/data
+3
docker-compose/entrypoint.sh
··· 17 17 if [ ! -f /data/lichen.toml ]; then 18 18 TOML_PROVIDERS=$(echo "${AUTH_PROVIDERS:-file,atproto}" | sed 's/[^,][^,]*/\"&\"/g') 19 19 echo "auth_providers = [$TOML_PROVIDERS]" > /data/lichen.toml 20 + if [ -n "$DEFAULT_STORAGE_LIMIT" ]; then 21 + echo "default_storage_limit = \"$DEFAULT_STORAGE_LIMIT\"" >> /data/lichen.toml 22 + fi 20 23 fi 21 24 22 25 # create or update admin user on every startup