Skip to main content

Laravel Forge

Inly Core ships a zero-downtime deployment script at vendor/inly/core/bin/deploy-forge.sh. Configure your Forge deployment script to call it:
$CREATE_RELEASE()

cd $FORGE_RELEASE_DIRECTORY

$FORGE_COMPOSER install --no-dev --no-interaction --prefer-dist --optimize-autoloader --no-plugins

export FORGE_PHP=$FORGE_PHP
bash ./vendor/inly/core/bin/deploy-forge.sh

$ACTIVATE_RELEASE()

$RESTART_QUEUES()
The script publishes core assets, installs frontend dependencies, generates TypeScript types, builds the frontend, runs migrations, generates permissions, and optimizes the application. --no-plugins avoids composer merge to update the lock file on deployment.

GitHub Actions

The workflow at .github/workflows/laravel.yml runs tests on every push and triggers a Forge deployment when tests pass on the main or master branch. To enable automatic deployment, add your Forge webhook URL as a repository secret:
1

Open repository settings

Navigate to Settings → Secrets and variables → Actions.
2

Add the secret

Click New repository secret, set the name to FORGE_DEPLOYMENT_URL, and paste your Forge deployment webhook URL.
Find the webhook URL in your Forge site settings under Meta → Deployment trigger URL.

Cloud Storage

To store media files in the cloud instead of local disk, create a public bucket named cloud and set the environment variable:
MEDIA_DISK=cloud

Queue Workers

Inly Core dispatches jobs across high, medium, and low priority queues. Use Laravel Horizon — configured via Forge — to process all queues automatically.

Manual Deployment

Manual deployment causes brief downtime. Use Forge’s zero-downtime deployment for production.
composer install --no-dev --optimize-autoloader
php artisan migrate --force
php artisan permissions:generate
pnpm install
composer generate-ts
pnpm run build
php artisan optimize
Restart your queue workers after the build completes.

Troubleshooting

  1. Review the Forge deployment logs for the specific error.
  2. Confirm all required environment variables are set.
  3. Check that the database connection is reachable.
  4. Verify file permissions on the server.
  1. Ensure Node.js and pnpm versions match your local environment.
  2. Check for missing entries in package.json.
  3. Review TypeScript errors printed in the build output.
  1. Verify all DTO classes are properly defined with no PHP syntax errors.
  2. Ensure composer generate-ts has the necessary file permissions.
  1. Check worker status: php artisan horizon:status.
  2. Verify the Redis connection configuration.
  3. Confirm workers were restarted after the last deployment.