DEV Community

Alan Miao
Alan Miao

Posted on

Optimizing PHP Applications on ClawCloud Run: A Comprehensive Template Guide

Introduction

As a seasoned PHP developer, I noticed ClawCloud Run's App Store offers limited PHP options (WordPress, Flarum, etc.), making custom Laravel deployments challenging. This inspired me to create an optimized PHP template solution.

Template Features

Instead of the official PHP Docker image (which lacks essential components like opcache), I selected webdevops/php-apache - a highly starred Docker image supporting PHP 8.0-8.4. Future plans include php-nginx and php-openlitespeed templates based on demand.

Deployment Guide

  1. Locate Template Navigate to App Store → Language category → PHP versions

img

  1. Choose Version Select desired PHP version (e.g., PHP 8.4) → Click "Deploy APP"

img

  1. Configure Access In APP Launchpad:
  • Find public endpoints under Public Address
  • Bind custom domains via Manage Network → Custom Domain

img

  1. Upload Application Use File Manager in Pod List to upload codebase. Initial deployments will show errors until files are uploaded.

img

  1. Verification Sample PHP info page after successful upload:

img

Advanced Configuration

Permission Issues Execute in terminal:

# Set ownership
chown -R application:application /app

# Add write permissions (if needed)
Enter fullscreen mode Exit fullscreen mode

Top comments (0)