Files
writefreely/entrypoint.sh
2025-09-10 18:20:05 -04:00

16 lines
393 B
Bash

#!/bin/sh
set -e
# Must match config mout point in compose.yml
CONFIG=/usr/share/writefreely/config.ini
SENTINEL=/data/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