Last active
July 9, 2025 18:02
-
-
Save sagalbot/8fcbc1a10c1fc95c78162fc0e786d2d6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -euo pipefail | |
# Install system dependencies | |
apt-get update -qq | |
apt-get install -y -qq --no-install-recommends \ | |
php-cli \ | |
php-mbstring \ | |
php-xml \ | |
php-curl \ | |
php-bcmath \ | |
php-mysql \ | |
php-tokenizer \ | |
php-zip \ | |
php-sqlite3 \ | |
php-common | |
# php-gd \ | |
# php-pgsql \ | |
# php-intl | |
# Install Composer | |
EXPECTED_CHECKSUM="$(curl -fsSL https://composer.github.io/installer.sig)" | |
curl -fsSL https://getcomposer.org/installer -o composer-setup.php | |
ACTUAL_CHECKSUM="$(sha384sum composer-setup.php | cut -d ' ' -f 1)" | |
[ "$EXPECTED_CHECKSUM" != "$ACTUAL_CHECKSUM" ] && exit 1 | |
php composer-setup.php --install-dir=/usr/local/bin --filename=composer | |
rm composer-setup.php | |
# Install Laravel project dependencies | |
composer install --no-interaction --prefer-dist --optimize-autoloader | |
# Create SQLite DB | |
touch database/database.sqlite | |
cp .env.example .env | |
sed -i 's/DB_CONNECTION=.*/DB_CONNECTION=sqlite/' .env | |
sed -i 's/DB_DATABASE=.*/DB_DATABASE=database\/database.sqlite/' .env | |
php artisan key:generate | |
# Run migrations | |
php artisan migrate --force | |
npm install | |
npm run build |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment