chore(docker): add docker support

This commit is contained in:
2026-02-05 16:03:38 +01:00
parent 207a6d5a7c
commit 3993fb7fc3
11 changed files with 729 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
#!/bin/sh
set -e
echo "Starting Cachet initialization..."
cd /var/www/html
if [ ! -f ".env" ]; then
echo "Creating .env file from .env.example..."
cp .env.example .env
fi
if [ -z "$APP_KEY" ] || [ "$APP_KEY" = "" ]; then
echo "Generating application key..."
php artisan key:generate --force
fi
echo "Caching configuration..."
php artisan config:cache
php artisan route:cache
php artisan view:cache
echo "Publishing Cachet assets..."
php artisan vendor:publish --tag=cachet --force
echo "Publishing Filament assets..."
php artisan filament:assets
echo "Running database migrations..."
php artisan migrate --force
echo "Creating storage symlink..."
php artisan storage:link || true
echo "Setting permissions..."
chown -R www-data:www-data /var/www/html/storage /var/www/html/bootstrap/cache
chmod -R 775 /var/www/html/storage /var/www/html/bootstrap/cache
echo "Cachet initialization complete!"
exec "$@"