Skip to content

Instantly share code, notes, and snippets.

@oscarhugopaz
Forked from mpociot/codex.sh
Created June 5, 2025 02:11
Show Gist options
  • Save oscarhugopaz/6250e2054fbebac160be4258963e558b to your computer and use it in GitHub Desktop.
Save oscarhugopaz/6250e2054fbebac160be4258963e558b 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
@oscarhugopaz
Copy link
Author

#!/usr/bin/env bash
set -e

echo "🚀 Instalando Herd (Laravel + PHP)..."
curl -fsSL https://php.new/install/linux | bash

export PATH="${HOME:-/root}/.config/herd-lite/bin:$PATH"

echo "📦 Instalando dependencias de backend..."
composer install --no-interaction

echo "⚙️ Configurando entorno Laravel..."
cp .env.example .env || true
php artisan key:generate

echo "🗃️ Migrando y sembrando base de datos..."
php artisan migrate --seed

echo "📦 Instalando dependencias de frontend..."
npm install

echo "🧱 Compilando assets..."
npm run build

echo "✅ Laravel está listo en el entorno Codex."

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