Skip to content

Instantly share code, notes, and snippets.

@mpociot
Created June 4, 2025 09:06
Show Gist options
  • Save mpociot/1d6809a600701beca4fa544551acd2de to your computer and use it in GitHub Desktop.
Save mpociot/1d6809a600701beca4fa544551acd2de to your computer and use it in GitHub Desktop.
OpenAI Codex PHP environment setup for Laravel
/bin/bash -c "$(curl -fsSL https://php.new/install/linux)"
export PATH="/root/.config/herd-lite/bin/:$PATH"
composer install
cp .env.example .env
php artisan key:generate
php artisan migrate --seed --force -n
npm install
npm run build
@ndeblauw
Copy link

ndeblauw commented Jun 5, 2025

Thanks for this script. How do you deal with the DB? I'm not managing to get mysql nor sqlite working out of the box on codex. Did you add a special feature somewhere else?

Additionally, why npm install and not npm install --no-save (which would avoid merging problems, no?) and why composer install and not composer install --no-interaction --prefer-dist --optimize-autoloader (which has less chance in getting blocked)? Just asking to learn and to see whether it can be improved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment