Initial commit of the Asset Management System, including project structure, Docker configuration, database migrations, and core application files. Added user authentication, asset management features, and basic UI components.
This commit is contained in:
26
scripts/entrypoint.sh
Normal file
26
scripts/entrypoint.sh
Normal file
@@ -0,0 +1,26 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Wait for database to be ready
|
||||
echo "Waiting for database to be ready..."
|
||||
while ! mysqladmin ping -h"$DB_HOST" -P"$DB_PORT" -u"$DB_USER" -p"$DB_PASS" --silent; do
|
||||
sleep 1
|
||||
done
|
||||
|
||||
echo "Database is ready!"
|
||||
|
||||
# Run migrations
|
||||
echo "Running database migrations..."
|
||||
php /var/www/html/scripts/migrate.php
|
||||
|
||||
# Run seeders if database is empty
|
||||
echo "Checking if seeders need to be run..."
|
||||
php /var/www/html/scripts/seed.php
|
||||
|
||||
# Set proper permissions
|
||||
chown -R www-data:www-data /var/www/html/storage
|
||||
chmod -R 755 /var/www/html/storage
|
||||
|
||||
echo "Application is ready!"
|
||||
|
||||
# Start PHP-FPM
|
||||
exec php-fpm
|
||||
Reference in New Issue
Block a user