homelab-butler/entrypoint.sh

12 lines
455 B
Bash

#!/bin/bash
set -e
# Configure bw CLI for Vaultwarden on first run
if [ ! -f /root/.config/Bitwarden\ CLI/data.json ] || ! bw status 2>/dev/null | grep -q '"status":"locked"'; then
bw config server https://vault.sascha-lutz.de 2>/dev/null || true
BW_CLIENTID="user.d0a1f14f-fcbb-436a-b18c-426987704df5" \
BW_CLIENTSECRET="wwr4O0pf7mWTOSmTslNP3jqzl5OERp" \
bw login --apikey 2>/dev/null || true
fi
exec uvicorn app:app --host 0.0.0.0 --port 8888