Files
writefreely/entrypoint.sh
2025-09-10 19:18:54 -04:00

16 lines
392 B
Bash

#!/bin/sh
set -e
# Must match config mout point in compose.yml
CONFIG="$ASSETS_PATH/config.ini"
SENTINEL="$DATA_PATH/abra_first_time_setup"
if [ ! -f $SENTINEL ]; then
echo "Running first-time setup"
/usr/bin/writefreely -c $CONFIG --gen-keys
/usr/bin/writefreely -c $CONFIG db init
touch $SENTINEL
fi
/usr/bin/writefreely -c $CONFIG db migrate
exec /usr/bin/writefreely -c $CONFIG