# PHP

Source : https://webgune.cloud/en-us/docs/web-php · Mis à jour le 2026-10-27

# PHP

PHP detection relies on `composer.json`, or failing that, on the presence of `.php` files at the root of the repository. PHP 8.3 is used by default.

## Laravel

```bash
APP_ENV=production
APP_KEY=base64:votre-clé-générée
APP_DEBUG=false
APP_URL=https://votre-domaine.com

DB_CONNECTION=mysql
DB_HOST=db.<namespace>.svc.cluster.local
DB_PORT=3306
DB_DATABASE=myapp
DB_USERNAME=myapp
DB_PASSWORD=change-moi

CACHE_DRIVER=redis
SESSION_DRIVER=redis
REDIS_URL=redis://cache.<namespace>.svc.cluster.local:6379
```

Recommended start command, including migrations:

```bash
php artisan migrate --force && php artisan serve --host 0.0.0.0 --port $PORT
```

> Generate `APP_KEY` once with `php artisan key:generate --show` and copy the value into the environment variables. Don't let Laravel regenerate it on every deployment, as that would invalidate existing sessions and encrypted cookies.

## WordPress

For WordPress, it's generally simpler to deploy the official image rather than a Git repository (see [Public Docker images](/docs/docker-images)).
