i really fucking hate webdev

This commit is contained in:
2025-08-12 11:39:05 +12:00
parent 44bdbaf4c6
commit e443c28fc4
2 changed files with 13 additions and 4 deletions

View File

@@ -7,13 +7,12 @@ set -e
: "${PB_DATA_DIR:?need PB_DATA_DIR}"
# ensure data dir exists (for embedded SQLite + migrations + files)
mkdir -p "${PB_DATA_DIR}"
export POCKETBASE_DATA_DIR="${PB_DATA_DIR}"
# mkdir -p "${PB_DATA_DIR}"
# export POCKETBASE_DATA_DIR="${PB_DATA_DIR}"
# if there are no users yet, create the superuser
# we check the sqlite file for any existing record in the users table
if [ ! -f "${PB_DATA_DIR}/pb_data.db" ] || ! \
sqlite3 "${PB_DATA_DIR}/pb_data.db" \
if ! sqlite3 "/pb/pb_data/data.db" \
"SELECT id FROM users WHERE email='${PB_ADMIN_EMAIL}' LIMIT 1;" \
| grep -q .; then