oidc
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
echo "Initializing database directories..."
|
||||
mkdir -p /app/chromadb /app/database
|
||||
echo "Initializing directories..."
|
||||
mkdir -p /app/chromadb
|
||||
|
||||
echo "Waiting for frontend to build..."
|
||||
while [ ! -f /app/raggr-frontend/dist/index.html ]; do
|
||||
@@ -10,19 +10,17 @@ while [ ! -f /app/raggr-frontend/dist/index.html ]; do
|
||||
done
|
||||
echo "Frontend built successfully!"
|
||||
|
||||
echo "Running database migrations..."
|
||||
aerich upgrade
|
||||
echo "Setting up database..."
|
||||
# Give PostgreSQL a moment to be ready (healthcheck in docker-compose handles this)
|
||||
sleep 3
|
||||
|
||||
echo "Initializing visited.db with indexed_documents table..."
|
||||
python3 -c "
|
||||
import sqlite3
|
||||
conn = sqlite3.connect('database/visited.db')
|
||||
c = conn.cursor()
|
||||
c.execute('CREATE TABLE IF NOT EXISTS indexed_documents (id INTEGER PRIMARY KEY AUTOINCREMENT, paperless_id INTEGER)')
|
||||
conn.commit()
|
||||
conn.close()
|
||||
print('Database initialized successfully')
|
||||
"
|
||||
if ls migrations/models/0_*.py 1> /dev/null 2>&1; then
|
||||
echo "Running database migrations..."
|
||||
aerich upgrade
|
||||
else
|
||||
echo "No migrations found, initializing database..."
|
||||
aerich init-db
|
||||
fi
|
||||
|
||||
echo "Starting reindex process..."
|
||||
python main.py "" --reindex || echo "Reindex failed, continuing anyway..."
|
||||
|
||||
Reference in New Issue
Block a user