page:guides:laravel:cdn assets

Deliver public assets through CDN for Laravel

Summary

Cdn assets for a Laravel app on Ample. Verified on Laravel: a versioned, immutable-cached asset uploaded to a published bucket and served from the CDN URL. Build and start: composer install --no-dev from composer.lock, then FrankenPHP serving public/ (php-server with the index.php fallback) reading PORT on the php-8.5 template.

Resource Requirements

Infrastructure Requirements

Prerequisites

Tested Configuration

Workflow Steps

  1. Build and start: composer install --no-dev from composer.lock, then FrankenPHP serving public/ (php-server with the index.php fallback) reading PORT on the php-8.5 template; the server must bind 0.0.0.0 on PORT.
  2. Publish a bucket for public assets: Publish only the asset bucket; upload versioned keys with an immutable Cache-Control header and build URLs from its public URL.
    • Command: ample bucket publish
  3. Verify: Fetch the live URL and /p/versioned-static-assets on the example; on failure read the build and runtime logs.
    • Command: ample logs --kind build

Examples

Success Checks

Limitations

Cost Estimate

Evidence Summary

Next Actions