Fix Docker deployment issues and add fresh database support
- Fix: Add missing 'click' import to app.py to resolve startup error - Fix: Update docker-compose.yml volume mappings to use correct persistent storage paths (/opt/digi-s) - Improve: Enhanced entrypoint.sh for better database initialization - Update: Configuration files for improved deployment This resolves the Docker container startup issues and ensures proper persistent storage.
This commit is contained in:
4
entrypoint.sh
Normal file → Executable file
4
entrypoint.sh
Normal file → Executable file
@@ -9,6 +9,10 @@ mkdir -p instance
|
||||
if [ ! -f instance/dashboard.db ]; then
|
||||
echo "No database found, initializing..."
|
||||
|
||||
# Remove and recreate migrations directory to ensure clean state
|
||||
rm -rf migrations
|
||||
mkdir -p migrations
|
||||
|
||||
# Initialize the database
|
||||
flask db init
|
||||
flask db migrate -m "Initial migration"
|
||||
|
||||
Reference in New Issue
Block a user