name: pictureframe
type: symfony
docroot: public
php_version: "8.4"
webserver_type: nginx-fpm
xdebug_enabled: false
additional_hostnames: []
additional_fqdns: []
database:
    type: postgres
    version: "16"
use_dns_when_possible: true
composer_version: "2"
nodejs_version: "22"
# imagick + pcov match the prod php image so dev/test parity is real.
# Installed via apt (deb.sury.org) — DDEV's web image doesn't ship pecl on PATH,
# so the extension-package route is more reliable across arch.
webimage_extra_packages:
    - php8.4-imagick
    - php8.4-pcov
web_environment:
    - APP_ENV=dev
    # DDEV's postgres service is reachable as host `db` from the web container.
    - DATABASE_URL=postgresql://db:db@db:5432/db?serverVersion=16&charset=utf8
    - MERCURE_URL=http://mercure/.well-known/mercure
    - MERCURE_PUBLIC_URL=https://pictureframe.ddev.site/.well-known/mercure
    - MERCURE_JWT_SECRET=!ChangeThisMercureHubJWTSecretKey!
hooks:
    post-start:
        # Keep dev deps in sync with the lock file, and warm node_modules so
        # `ddev exec cd frontend && npm test` works on a fresh clone.
        - exec: "composer install --no-interaction"
        - exec: "[ -d frontend/node_modules ] || (cd frontend && npm install)"
