feat: Update Docker entrypoint scripts to create admin account on container startup
This commit is contained in:
17
docker-entrypoint.sh
Normal file
17
docker-entrypoint.sh
Normal file
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Container startup script
|
||||
# This runs when the container starts, not during build
|
||||
|
||||
echo "🚀 Starting application..."
|
||||
|
||||
# Ensure data directory exists
|
||||
mkdir -p /app/data
|
||||
|
||||
# Create admin account if it doesn't exist
|
||||
echo "🔧 Setting up admin account..."
|
||||
node scripts/create-admin.js
|
||||
|
||||
# Start the application
|
||||
echo "✅ Starting production server..."
|
||||
exec npm start
|
||||
Reference in New Issue
Block a user