Containerize

This commit is contained in:
Benjamin Morgan 2025-12-25 22:48:27 -07:00
parent 71dcefcf01
commit dee736bd54
7 changed files with 59 additions and 8 deletions

15
docker-entrypoint.sh Executable file
View file

@ -0,0 +1,15 @@
#!/bin/sh
set -e
DB_PATH="/data/mstbot.db"
SCHEMA="/app/schema.sql"
if [ ! -f "$DB_PATH" ]; then
echo "SQLite DB not found, initializing…"
mkdir -p "$(dirname "$DB_PATH")"
sqlite3 "$DB_PATH" < "$SCHEMA"
else
echo "SQLite DB exists, skipping init"
fi
exec "$@"