server-php: - Add nginx.conf, fpm-pool.conf.template, supervisord.conf - Add php.ini.template, php-prod.ini, php-dev.ini - Add opcache-prod.ini, xdebug.ini - Add nginx-performance.conf for production - Add entrypoint.sh script developer: - Remove git-delta (not available in Alpine 3.22 repos) Closes #3 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
20 lines
607 B
Bash
20 lines
607 B
Bash
#!/bin/sh
|
|
set -e
|
|
|
|
# Install PHP dependencies if vendor directory is empty
|
|
if [ ! -f "/app/vendor/autoload.php" ]; then
|
|
echo "Installing PHP dependencies..."
|
|
composer install --no-interaction --prefer-dist
|
|
fi
|
|
|
|
# Install Node dependencies if node_modules is empty
|
|
if [ ! -d "/app/node_modules" ] || [ -z "$(ls -A /app/node_modules 2>/dev/null)" ]; then
|
|
echo "Installing Node dependencies..."
|
|
npm install
|
|
fi
|
|
|
|
# Run database migrations (skip errors if DB not ready)
|
|
php artisan migrate --force 2>/dev/null || echo "Migrations skipped (DB may not be ready)"
|
|
|
|
# Execute the main command
|
|
exec "$@"
|