diff --git a/frameworks/cakephp/3.yaml b/frameworks/cakephp/3.yaml new file mode 100644 index 0000000..8b3c8e0 --- /dev/null +++ b/frameworks/cakephp/3.yaml @@ -0,0 +1,80 @@ +name: cakephp +version: "3" +label: CakePHP +public_dir: webroot +create: composer create-project cakephp/app +php: + min: "7.2" + max: "7.4" + +detect: + - file: bin/cake + - composer: cakephp/cakephp + +env: + file: config/.env + example_file: config/.env.example + format: dotenv + url_key: APP_URL + services: + mysql: + detect: + - key: DATABASE_URL + value_prefix: "mysql://" + vars: + - "DATABASE_URL=mysql://root:lerd@lerd-mysql:3306/{{site}}" + postgres: + detect: + - key: DATABASE_URL + value_prefix: "postgres://" + vars: + - "DATABASE_URL=postgres://postgres:lerd@lerd-postgres:5432/{{site}}" + redis: + detect: + - key: CACHE_URL + value_prefix: "redis://" + vars: + - "CACHE_URL=redis://lerd-redis:6379" + mailpit: + detect: + - key: EMAIL_TRANSPORT_DEFAULT_URL + vars: + - "EMAIL_TRANSPORT_DEFAULT_URL=smtp://lerd-mailpit:1025" + +composer: auto +npm: auto +console: bin/cake + +logs: + - path: logs/*.log + format: raw + +setup: + - label: Run migrations + command: bin/cake migrations migrate + default: true + - label: Clear cache + command: bin/cake cache clear_all + default: true + +commands: + - name: cache:clear + label: Clear all caches + command: bin/cake cache clear_all + description: Clear every configured cache pool + output: silent + icon: broom + - name: migrate + label: Run migrations + command: bin/cake migrations migrate + description: Apply pending migrations + output: silent + icon: database + check: + composer: cakephp/migrations + - name: schema:cache:clear + label: Clear schema cache + command: bin/cake schema_cache clear + description: Drop the cached database schema + output: silent + icon: refresh diff --git a/frameworks/codeigniter/3.yaml b/frameworks/codeigniter/3.yaml new file mode 100644 index 0000000..c80e41d --- /dev/null +++ b/frameworks/codeigniter/3.yaml @@ -0,0 +1,32 @@ +name: codeigniter +version: "3" +label: CodeIgniter +public_dir: . +create: composer create-project codeigniter/framework + +php: + min: "7.2" + max: "7.4" + +# CodeIgniter 3 has no spark CLI and no composer entry of its own in most +# projects, so it is recognised by the framework directory the installer lays +# down next to the front controller. +detect: + - file: system/core/CodeIgniter.php + - composer: codeigniter/framework + +# Configuration lives in PHP files under application/config rather than a +# dotenv file, so there is nothing for lerd to write connection values into. +env: + file: "" + format: none + +composer: auto +npm: false + +# No console: CodeIgniter 3 ships no CLI runner, so there are no workers, no +# setup commands and no tinker. + +logs: + - path: application/logs/log-*.php + format: plain diff --git a/frameworks/drupal/8.yaml b/frameworks/drupal/8.yaml new file mode 100644 index 0000000..982148c --- /dev/null +++ b/frameworks/drupal/8.yaml @@ -0,0 +1,128 @@ +name: drupal +version: "8" +label: Drupal +public_dir: web +favicon: core/misc/favicon.ico +create: composer create-project drupal/recommended-project +php: + min: "7.2" + max: "7.4" + +detect: + - composer: drupal/core-recommended + - composer: drupal/core + +env: + file: .env + format: dotenv + fallback_file: web/sites/default/settings.php + fallback_format: php-const + services: + mysql: + detect: + - key: DB_DRIVER + value_prefix: mysql + - key: database + value_prefix: mysql + vars: + - DB_DRIVER=mysql + - DB_HOST=lerd-mysql + - DB_PORT=3306 + - DB_NAME={{site}} + - DB_USER=root + - DB_PASSWORD=lerd + postgres: + detect: + - key: DB_DRIVER + value_prefix: pgsql + - key: database + value_prefix: pgsql + vars: + - DB_DRIVER=pgsql + - DB_HOST=lerd-postgres + - DB_PORT=5432 + - DB_NAME={{site}} + - DB_USER=postgres + - DB_PASSWORD=lerd + redis: + detect: + - key: REDIS_HOST + vars: + - REDIS_HOST=lerd-redis + - REDIS_PORT=6379 + mailpit: + detect: + - key: SMTP_HOST + vars: + - SMTP_HOST=lerd-mailpit + - SMTP_PORT=1025 + +composer: auto +npm: false + +workers: + cron: + label: Cron + command: php vendor/drush/drush/drush.php cron + restart: always + check: + composer: drush/drush + +setup: + - label: Install site + command: php vendor/drush/drush/drush.php site:install --yes + check: + composer: drush/drush + - label: Run database updates + command: php vendor/drush/drush/drush.php updatedb --yes + default: true + check: + composer: drush/drush + - label: Rebuild cache + command: php vendor/drush/drush/drush.php cache:rebuild + default: true + check: + composer: drush/drush + - label: Import config + command: php vendor/drush/drush/drush.php config:import --yes + check: + composer: drush/drush + +tinker: + command: ["vendor/drush/drush/drush.php", "php:eval"] + execute_positional: true + requires_package: drush/drush + requires_file: vendor/drush/drush/drush.php + +commands: + - name: cr + label: Rebuild cache + command: drush cr + description: Rebuild all Drupal caches + output: silent + icon: broom + - name: uli + label: Login as admin + command: drush uli + description: Generate a one-time admin login URL + output: url + icon: key + - name: updb + label: Run database updates + command: drush updb -y + description: Apply pending hook_update_N updates + output: silent + icon: database + - name: cex + label: Export config + command: drush cex -y + description: Export configuration to the sync directory + output: text + icon: arrow-up + - name: cim + label: Import config + command: drush cim -y + description: Import configuration from the sync directory + output: text + confirm: true + icon: arrow-down diff --git a/frameworks/drupal/9.yaml b/frameworks/drupal/9.yaml new file mode 100644 index 0000000..70d50ac --- /dev/null +++ b/frameworks/drupal/9.yaml @@ -0,0 +1,128 @@ +name: drupal +version: "9" +label: Drupal +public_dir: web +favicon: core/misc/favicon.ico +create: composer create-project drupal/recommended-project +php: + min: "7.3" + max: "8.1" + +detect: + - composer: drupal/core-recommended + - composer: drupal/core + +env: + file: .env + format: dotenv + fallback_file: web/sites/default/settings.php + fallback_format: php-const + services: + mysql: + detect: + - key: DB_DRIVER + value_prefix: mysql + - key: database + value_prefix: mysql + vars: + - DB_DRIVER=mysql + - DB_HOST=lerd-mysql + - DB_PORT=3306 + - DB_NAME={{site}} + - DB_USER=root + - DB_PASSWORD=lerd + postgres: + detect: + - key: DB_DRIVER + value_prefix: pgsql + - key: database + value_prefix: pgsql + vars: + - DB_DRIVER=pgsql + - DB_HOST=lerd-postgres + - DB_PORT=5432 + - DB_NAME={{site}} + - DB_USER=postgres + - DB_PASSWORD=lerd + redis: + detect: + - key: REDIS_HOST + vars: + - REDIS_HOST=lerd-redis + - REDIS_PORT=6379 + mailpit: + detect: + - key: SMTP_HOST + vars: + - SMTP_HOST=lerd-mailpit + - SMTP_PORT=1025 + +composer: auto +npm: false + +workers: + cron: + label: Cron + command: php vendor/drush/drush/drush.php cron + restart: always + check: + composer: drush/drush + +setup: + - label: Install site + command: php vendor/drush/drush/drush.php site:install --yes + check: + composer: drush/drush + - label: Run database updates + command: php vendor/drush/drush/drush.php updatedb --yes + default: true + check: + composer: drush/drush + - label: Rebuild cache + command: php vendor/drush/drush/drush.php cache:rebuild + default: true + check: + composer: drush/drush + - label: Import config + command: php vendor/drush/drush/drush.php config:import --yes + check: + composer: drush/drush + +tinker: + command: ["vendor/drush/drush/drush.php", "php:eval"] + execute_positional: true + requires_package: drush/drush + requires_file: vendor/drush/drush/drush.php + +commands: + - name: cr + label: Rebuild cache + command: drush cr + description: Rebuild all Drupal caches + output: silent + icon: broom + - name: uli + label: Login as admin + command: drush uli + description: Generate a one-time admin login URL + output: url + icon: key + - name: updb + label: Run database updates + command: drush updb -y + description: Apply pending hook_update_N updates + output: silent + icon: database + - name: cex + label: Export config + command: drush cex -y + description: Export configuration to the sync directory + output: text + icon: arrow-up + - name: cim + label: Import config + command: drush cim -y + description: Import configuration from the sync directory + output: text + confirm: true + icon: arrow-down diff --git a/frameworks/laravel/6.yaml b/frameworks/laravel/6.yaml new file mode 100644 index 0000000..d6ac0f4 --- /dev/null +++ b/frameworks/laravel/6.yaml @@ -0,0 +1,194 @@ +name: laravel +version: "6" +label: Laravel +public_dir: public +create: composer create-project --no-install --no-plugins --no-scripts laravel/laravel + +php: + min: "7.2" + max: "8.0" + +detect: + - file: artisan + - composer: laravel/framework + +env: + file: .env + example_file: .env.example + format: dotenv + key_generation: + env_key: APP_KEY + command: key:generate + fallback_prefix: "base64:" + services: + mysql: + detect: + - key: DB_CONNECTION + value_prefix: mysql + - key: DB_CONNECTION + value_prefix: mariadb + vars: + - DB_CONNECTION=mysql + - DB_HOST=lerd-mysql + - DB_PORT=3306 + - DB_DATABASE={{site}} + - DB_USERNAME=root + - DB_PASSWORD=lerd + postgres: + detect: + - key: DB_CONNECTION + value_prefix: pgsql + vars: + - DB_CONNECTION=pgsql + - DB_HOST=lerd-postgres + - DB_PORT=5432 + - DB_DATABASE={{site}} + - DB_USERNAME=postgres + - DB_PASSWORD=lerd + redis: + detect: + - key: REDIS_HOST + - key: CACHE_DRIVER + value_prefix: redis + - key: SESSION_DRIVER + value_prefix: redis + - key: QUEUE_CONNECTION + value_prefix: redis + vars: + - REDIS_HOST=lerd-redis + - REDIS_PORT=6379 + - REDIS_PASSWORD= + meilisearch: + detect: + - key: SCOUT_DRIVER + value_prefix: meilisearch + vars: + - MEILISEARCH_HOST=http://lerd-meilisearch:7700 + - MEILISEARCH_NO_ANALYTICS=true + rustfs: + detect: + - key: FILESYSTEM_DISK + value_prefix: s3 + - key: AWS_ENDPOINT + vars: + - AWS_ACCESS_KEY_ID=lerd + - AWS_SECRET_ACCESS_KEY=lerdpassword + - AWS_BUCKET={{site}} + - AWS_ENDPOINT=http://lerd-rustfs:9000 + - AWS_URL=http://localhost:9000/{{site}} + - AWS_USE_PATH_STYLE_ENDPOINT=true + mailpit: + detect: + - key: MAIL_HOST + vars: + - MAIL_MAILER=smtp + - MAIL_HOST=lerd-mailpit + - MAIL_PORT=1025 + - MAIL_USERNAME=null + - MAIL_PASSWORD=null + - MAIL_ENCRYPTION=null + +composer: auto +npm: auto +console: artisan + +workers: + queue: + label: Queue Worker + command: php artisan queue:work --queue=default --tries=3 --timeout=60 + tune_command: php artisan queue:work --queue={queue} --tries={tries} --timeout={timeout} + restart_command: php artisan queue:restart + restart: always + exclude_check: + composer: laravel/horizon + schedule: + label: Task Scheduler + command: php artisan schedule:run + schedule: minutely + horizon: + label: Horizon + command: php artisan horizon + reload_command: php artisan horizon:listen + restart: always + check: + composer: laravel/horizon + conflicts_with: + - queue + +logs: + - path: storage/logs/*.log + format: monolog + +setup: + - label: php artisan storage:link + command: php artisan storage:link + default: true + - label: php artisan migrate + command: php artisan migrate + default: true + - label: php artisan db:seed + command: php artisan db:seed + default: false +tinker: + command: ["artisan", "tinker"] + execute_flag: "--execute" + requires_package: laravel/tinker + requires_file: artisan + +commands: + - name: optimize:clear + label: Clear all caches + command: php artisan optimize:clear + description: Clear config, route, view, event, and compiled caches + output: silent + icon: broom + - name: migrate + label: Run migrations + command: php artisan migrate --force + description: Apply pending database migrations + output: silent + icon: database + - name: migrate:fresh + label: Drop and re-migrate + command: php artisan migrate:fresh --seed --force + description: Wipe the database, re-run all migrations, then seed + output: silent + confirm: true + icon: refresh + - name: key:generate + label: Generate APP_KEY + command: php artisan key:generate + description: Set the application encryption key in .env + output: silent + icon: key + - name: storage:link + label: Link storage + command: php artisan storage:link + description: Create the public/storage symlink to storage/app/public + output: silent + icon: link + +doctor: + checks: + - name: app_debug + type: env_combo + when: + APP_ENV: production + warn_if: + APP_DEBUG: "true" + detail: "APP_DEBUG is on while APP_ENV=production, so stack traces and config will leak. Turn debug off." + - name: storage_link + type: symlink + link: public/storage + target: storage/app/public + requires_dir: public + fix: storage:link + detail: "public/storage symlink is missing, so files on the public disk won't be web-accessible." + - name: migrations + type: command + command: php artisan migrate:status + fail_if_output_contains: Pending + fail_if_error_contains: Migration table not found + unknown_on_error: true + fix: migrate + detail: "There are pending migrations, run migrate to apply them." diff --git a/frameworks/laravel/7.yaml b/frameworks/laravel/7.yaml new file mode 100644 index 0000000..1e38b75 --- /dev/null +++ b/frameworks/laravel/7.yaml @@ -0,0 +1,194 @@ +name: laravel +version: "7" +label: Laravel +public_dir: public +create: composer create-project --no-install --no-plugins --no-scripts laravel/laravel + +php: + min: "7.2" + max: "8.0" + +detect: + - file: artisan + - composer: laravel/framework + +env: + file: .env + example_file: .env.example + format: dotenv + key_generation: + env_key: APP_KEY + command: key:generate + fallback_prefix: "base64:" + services: + mysql: + detect: + - key: DB_CONNECTION + value_prefix: mysql + - key: DB_CONNECTION + value_prefix: mariadb + vars: + - DB_CONNECTION=mysql + - DB_HOST=lerd-mysql + - DB_PORT=3306 + - DB_DATABASE={{site}} + - DB_USERNAME=root + - DB_PASSWORD=lerd + postgres: + detect: + - key: DB_CONNECTION + value_prefix: pgsql + vars: + - DB_CONNECTION=pgsql + - DB_HOST=lerd-postgres + - DB_PORT=5432 + - DB_DATABASE={{site}} + - DB_USERNAME=postgres + - DB_PASSWORD=lerd + redis: + detect: + - key: REDIS_HOST + - key: CACHE_DRIVER + value_prefix: redis + - key: SESSION_DRIVER + value_prefix: redis + - key: QUEUE_CONNECTION + value_prefix: redis + vars: + - REDIS_HOST=lerd-redis + - REDIS_PORT=6379 + - REDIS_PASSWORD= + meilisearch: + detect: + - key: SCOUT_DRIVER + value_prefix: meilisearch + vars: + - MEILISEARCH_HOST=http://lerd-meilisearch:7700 + - MEILISEARCH_NO_ANALYTICS=true + rustfs: + detect: + - key: FILESYSTEM_DISK + value_prefix: s3 + - key: AWS_ENDPOINT + vars: + - AWS_ACCESS_KEY_ID=lerd + - AWS_SECRET_ACCESS_KEY=lerdpassword + - AWS_BUCKET={{site}} + - AWS_ENDPOINT=http://lerd-rustfs:9000 + - AWS_URL=http://localhost:9000/{{site}} + - AWS_USE_PATH_STYLE_ENDPOINT=true + mailpit: + detect: + - key: MAIL_HOST + vars: + - MAIL_MAILER=smtp + - MAIL_HOST=lerd-mailpit + - MAIL_PORT=1025 + - MAIL_USERNAME=null + - MAIL_PASSWORD=null + - MAIL_ENCRYPTION=null + +composer: auto +npm: auto +console: artisan + +workers: + queue: + label: Queue Worker + command: php artisan queue:work --queue=default --tries=3 --timeout=60 + tune_command: php artisan queue:work --queue={queue} --tries={tries} --timeout={timeout} + restart_command: php artisan queue:restart + restart: always + exclude_check: + composer: laravel/horizon + schedule: + label: Task Scheduler + command: php artisan schedule:run + schedule: minutely + horizon: + label: Horizon + command: php artisan horizon + reload_command: php artisan horizon:listen + restart: always + check: + composer: laravel/horizon + conflicts_with: + - queue + +logs: + - path: storage/logs/*.log + format: monolog + +setup: + - label: php artisan storage:link + command: php artisan storage:link + default: true + - label: php artisan migrate + command: php artisan migrate + default: true + - label: php artisan db:seed + command: php artisan db:seed + default: false +tinker: + command: ["artisan", "tinker"] + execute_flag: "--execute" + requires_package: laravel/tinker + requires_file: artisan + +commands: + - name: optimize:clear + label: Clear all caches + command: php artisan optimize:clear + description: Clear config, route, view, event, and compiled caches + output: silent + icon: broom + - name: migrate + label: Run migrations + command: php artisan migrate --force + description: Apply pending database migrations + output: silent + icon: database + - name: migrate:fresh + label: Drop and re-migrate + command: php artisan migrate:fresh --seed --force + description: Wipe the database, re-run all migrations, then seed + output: silent + confirm: true + icon: refresh + - name: key:generate + label: Generate APP_KEY + command: php artisan key:generate + description: Set the application encryption key in .env + output: silent + icon: key + - name: storage:link + label: Link storage + command: php artisan storage:link + description: Create the public/storage symlink to storage/app/public + output: silent + icon: link + +doctor: + checks: + - name: app_debug + type: env_combo + when: + APP_ENV: production + warn_if: + APP_DEBUG: "true" + detail: "APP_DEBUG is on while APP_ENV=production, so stack traces and config will leak. Turn debug off." + - name: storage_link + type: symlink + link: public/storage + target: storage/app/public + requires_dir: public + fix: storage:link + detail: "public/storage symlink is missing, so files on the public disk won't be web-accessible." + - name: migrations + type: command + command: php artisan migrate:status + fail_if_output_contains: Pending + fail_if_error_contains: Migration table not found + unknown_on_error: true + fix: migrate + detail: "There are pending migrations, run migrate to apply them." diff --git a/frameworks/laravel/8.yaml b/frameworks/laravel/8.yaml new file mode 100644 index 0000000..659d92b --- /dev/null +++ b/frameworks/laravel/8.yaml @@ -0,0 +1,194 @@ +name: laravel +version: "8" +label: Laravel +public_dir: public +create: composer create-project --no-install --no-plugins --no-scripts laravel/laravel + +php: + min: "7.3" + max: "8.1" + +detect: + - file: artisan + - composer: laravel/framework + +env: + file: .env + example_file: .env.example + format: dotenv + key_generation: + env_key: APP_KEY + command: key:generate + fallback_prefix: "base64:" + services: + mysql: + detect: + - key: DB_CONNECTION + value_prefix: mysql + - key: DB_CONNECTION + value_prefix: mariadb + vars: + - DB_CONNECTION=mysql + - DB_HOST=lerd-mysql + - DB_PORT=3306 + - DB_DATABASE={{site}} + - DB_USERNAME=root + - DB_PASSWORD=lerd + postgres: + detect: + - key: DB_CONNECTION + value_prefix: pgsql + vars: + - DB_CONNECTION=pgsql + - DB_HOST=lerd-postgres + - DB_PORT=5432 + - DB_DATABASE={{site}} + - DB_USERNAME=postgres + - DB_PASSWORD=lerd + redis: + detect: + - key: REDIS_HOST + - key: CACHE_DRIVER + value_prefix: redis + - key: SESSION_DRIVER + value_prefix: redis + - key: QUEUE_CONNECTION + value_prefix: redis + vars: + - REDIS_HOST=lerd-redis + - REDIS_PORT=6379 + - REDIS_PASSWORD= + meilisearch: + detect: + - key: SCOUT_DRIVER + value_prefix: meilisearch + vars: + - MEILISEARCH_HOST=http://lerd-meilisearch:7700 + - MEILISEARCH_NO_ANALYTICS=true + rustfs: + detect: + - key: FILESYSTEM_DISK + value_prefix: s3 + - key: AWS_ENDPOINT + vars: + - AWS_ACCESS_KEY_ID=lerd + - AWS_SECRET_ACCESS_KEY=lerdpassword + - AWS_BUCKET={{site}} + - AWS_ENDPOINT=http://lerd-rustfs:9000 + - AWS_URL=http://localhost:9000/{{site}} + - AWS_USE_PATH_STYLE_ENDPOINT=true + mailpit: + detect: + - key: MAIL_HOST + vars: + - MAIL_MAILER=smtp + - MAIL_HOST=lerd-mailpit + - MAIL_PORT=1025 + - MAIL_USERNAME=null + - MAIL_PASSWORD=null + - MAIL_ENCRYPTION=null + +composer: auto +npm: auto +console: artisan + +workers: + queue: + label: Queue Worker + command: php artisan queue:work --queue=default --tries=3 --timeout=60 + tune_command: php artisan queue:work --queue={queue} --tries={tries} --timeout={timeout} + restart_command: php artisan queue:restart + restart: always + exclude_check: + composer: laravel/horizon + schedule: + label: Task Scheduler + command: php artisan schedule:run + schedule: minutely + horizon: + label: Horizon + command: php artisan horizon + reload_command: php artisan horizon:listen + restart: always + check: + composer: laravel/horizon + conflicts_with: + - queue + +logs: + - path: storage/logs/*.log + format: monolog + +setup: + - label: php artisan storage:link + command: php artisan storage:link + default: true + - label: php artisan migrate + command: php artisan migrate + default: true + - label: php artisan db:seed + command: php artisan db:seed + default: false +tinker: + command: ["artisan", "tinker"] + execute_flag: "--execute" + requires_package: laravel/tinker + requires_file: artisan + +commands: + - name: optimize:clear + label: Clear all caches + command: php artisan optimize:clear + description: Clear config, route, view, event, and compiled caches + output: silent + icon: broom + - name: migrate + label: Run migrations + command: php artisan migrate --force + description: Apply pending database migrations + output: silent + icon: database + - name: migrate:fresh + label: Drop and re-migrate + command: php artisan migrate:fresh --seed --force + description: Wipe the database, re-run all migrations, then seed + output: silent + confirm: true + icon: refresh + - name: key:generate + label: Generate APP_KEY + command: php artisan key:generate + description: Set the application encryption key in .env + output: silent + icon: key + - name: storage:link + label: Link storage + command: php artisan storage:link + description: Create the public/storage symlink to storage/app/public + output: silent + icon: link + +doctor: + checks: + - name: app_debug + type: env_combo + when: + APP_ENV: production + warn_if: + APP_DEBUG: "true" + detail: "APP_DEBUG is on while APP_ENV=production, so stack traces and config will leak. Turn debug off." + - name: storage_link + type: symlink + link: public/storage + target: storage/app/public + requires_dir: public + fix: storage:link + detail: "public/storage symlink is missing, so files on the public disk won't be web-accessible." + - name: migrations + type: command + command: php artisan migrate:status + fail_if_output_contains: Pending + fail_if_error_contains: Migration table not found + unknown_on_error: true + fix: migrate + detail: "There are pending migrations, run migrate to apply them." diff --git a/frameworks/laravel/9.yaml b/frameworks/laravel/9.yaml new file mode 100644 index 0000000..bc97411 --- /dev/null +++ b/frameworks/laravel/9.yaml @@ -0,0 +1,194 @@ +name: laravel +version: "9" +label: Laravel +public_dir: public +create: composer create-project --no-install --no-plugins --no-scripts laravel/laravel + +php: + min: "8.0" + max: "8.2" + +detect: + - file: artisan + - composer: laravel/framework + +env: + file: .env + example_file: .env.example + format: dotenv + key_generation: + env_key: APP_KEY + command: key:generate + fallback_prefix: "base64:" + services: + mysql: + detect: + - key: DB_CONNECTION + value_prefix: mysql + - key: DB_CONNECTION + value_prefix: mariadb + vars: + - DB_CONNECTION=mysql + - DB_HOST=lerd-mysql + - DB_PORT=3306 + - DB_DATABASE={{site}} + - DB_USERNAME=root + - DB_PASSWORD=lerd + postgres: + detect: + - key: DB_CONNECTION + value_prefix: pgsql + vars: + - DB_CONNECTION=pgsql + - DB_HOST=lerd-postgres + - DB_PORT=5432 + - DB_DATABASE={{site}} + - DB_USERNAME=postgres + - DB_PASSWORD=lerd + redis: + detect: + - key: REDIS_HOST + - key: CACHE_DRIVER + value_prefix: redis + - key: SESSION_DRIVER + value_prefix: redis + - key: QUEUE_CONNECTION + value_prefix: redis + vars: + - REDIS_HOST=lerd-redis + - REDIS_PORT=6379 + - REDIS_PASSWORD= + meilisearch: + detect: + - key: SCOUT_DRIVER + value_prefix: meilisearch + vars: + - MEILISEARCH_HOST=http://lerd-meilisearch:7700 + - MEILISEARCH_NO_ANALYTICS=true + rustfs: + detect: + - key: FILESYSTEM_DISK + value_prefix: s3 + - key: AWS_ENDPOINT + vars: + - AWS_ACCESS_KEY_ID=lerd + - AWS_SECRET_ACCESS_KEY=lerdpassword + - AWS_BUCKET={{site}} + - AWS_ENDPOINT=http://lerd-rustfs:9000 + - AWS_URL=http://localhost:9000/{{site}} + - AWS_USE_PATH_STYLE_ENDPOINT=true + mailpit: + detect: + - key: MAIL_HOST + vars: + - MAIL_MAILER=smtp + - MAIL_HOST=lerd-mailpit + - MAIL_PORT=1025 + - MAIL_USERNAME=null + - MAIL_PASSWORD=null + - MAIL_ENCRYPTION=null + +composer: auto +npm: auto +console: artisan + +workers: + queue: + label: Queue Worker + command: php artisan queue:work --queue=default --tries=3 --timeout=60 + tune_command: php artisan queue:work --queue={queue} --tries={tries} --timeout={timeout} + restart_command: php artisan queue:restart + restart: always + exclude_check: + composer: laravel/horizon + schedule: + label: Task Scheduler + command: php artisan schedule:run + schedule: minutely + horizon: + label: Horizon + command: php artisan horizon + reload_command: php artisan horizon:listen + restart: always + check: + composer: laravel/horizon + conflicts_with: + - queue + +logs: + - path: storage/logs/*.log + format: monolog + +setup: + - label: php artisan storage:link + command: php artisan storage:link + default: true + - label: php artisan migrate + command: php artisan migrate + default: true + - label: php artisan db:seed + command: php artisan db:seed + default: false +tinker: + command: ["artisan", "tinker"] + execute_flag: "--execute" + requires_package: laravel/tinker + requires_file: artisan + +commands: + - name: optimize:clear + label: Clear all caches + command: php artisan optimize:clear + description: Clear config, route, view, event, and compiled caches + output: silent + icon: broom + - name: migrate + label: Run migrations + command: php artisan migrate --force + description: Apply pending database migrations + output: silent + icon: database + - name: migrate:fresh + label: Drop and re-migrate + command: php artisan migrate:fresh --seed --force + description: Wipe the database, re-run all migrations, then seed + output: silent + confirm: true + icon: refresh + - name: key:generate + label: Generate APP_KEY + command: php artisan key:generate + description: Set the application encryption key in .env + output: silent + icon: key + - name: storage:link + label: Link storage + command: php artisan storage:link + description: Create the public/storage symlink to storage/app/public + output: silent + icon: link + +doctor: + checks: + - name: app_debug + type: env_combo + when: + APP_ENV: production + warn_if: + APP_DEBUG: "true" + detail: "APP_DEBUG is on while APP_ENV=production, so stack traces and config will leak. Turn debug off." + - name: storage_link + type: symlink + link: public/storage + target: storage/app/public + requires_dir: public + fix: storage:link + detail: "public/storage symlink is missing, so files on the public disk won't be web-accessible." + - name: migrations + type: command + command: php artisan migrate:status + fail_if_output_contains: Pending + fail_if_error_contains: Migration table not found + unknown_on_error: true + fix: migrate + detail: "There are pending migrations, run migrate to apply them." diff --git a/frameworks/statamic/3.yaml b/frameworks/statamic/3.yaml new file mode 100644 index 0000000..36b91d9 --- /dev/null +++ b/frameworks/statamic/3.yaml @@ -0,0 +1,130 @@ +name: statamic +version: "3" +label: Statamic +public_dir: public +create: composer create-project statamic/statamic +php: + min: "7.4" + max: "8.1" + +detect: + - composer: statamic/cms + +env: + file: .env + example_file: .env.example + format: dotenv + key_generation: + env_key: APP_KEY + command: key:generate + fallback_prefix: "base64:" + services: + mysql: + detect: + - key: DB_CONNECTION + value_prefix: mysql + vars: + - DB_CONNECTION=mysql + - DB_HOST=lerd-mysql + - DB_PORT=3306 + - DB_DATABASE={{site}} + - DB_USERNAME=root + - DB_PASSWORD=lerd + postgres: + detect: + - key: DB_CONNECTION + value_prefix: pgsql + vars: + - DB_CONNECTION=pgsql + - DB_HOST=lerd-postgres + - DB_PORT=5432 + - DB_DATABASE={{site}} + - DB_USERNAME=postgres + - DB_PASSWORD=lerd + redis: + detect: + - key: REDIS_HOST + vars: + - REDIS_HOST=lerd-redis + - REDIS_PORT=6379 + - REDIS_PASSWORD= + mailpit: + detect: + - key: MAIL_HOST + vars: + - MAIL_MAILER=smtp + - MAIL_HOST=lerd-mailpit + - MAIL_PORT=1025 + - MAIL_USERNAME=null + - MAIL_PASSWORD=null + - MAIL_ENCRYPTION=null + +composer: auto +npm: auto +console: artisan + +workers: + queue: + label: Queue Worker + command: php artisan queue:work --queue=default --tries=3 --timeout=60 + restart: always + schedule: + label: Task Scheduler + command: php artisan schedule:work + restart: always + +logs: + - path: storage/logs/*.log + format: monolog + +setup: + - label: php artisan storage:link + command: php artisan storage:link + default: true + - label: php please install + command: php please install + default: true + - label: Refresh stache + command: php please stache:refresh + default: true +tinker: + command: ["artisan", "tinker"] + execute_flag: "--execute" + requires_package: laravel/tinker + requires_file: artisan + +commands: + - name: cache:clear + label: Clear all caches + command: php please cache:clear + description: Clear Statamic and Laravel caches + output: silent + icon: broom + - name: stache:warm + label: Warm Stache + command: php please stache:warm + description: Pre-build the Stache index + output: silent + icon: refresh + - name: search:update + label: Update search + command: php please search:update --all + description: Reindex all configured search indexes + output: silent + icon: refresh + +doctor: + checks: + - name: app_debug + type: env_combo + when: + APP_ENV: production + warn_if: + APP_DEBUG: "true" + detail: "APP_DEBUG is on while APP_ENV=production, so stack traces and config will leak. Turn debug off." + - name: storage_link + type: symlink + link: public/storage + target: storage/app/public + requires_dir: public + detail: "public/storage symlink is missing, so files on the public disk won't be web-accessible. Run php please storage:link." diff --git a/frameworks/statamic/4.yaml b/frameworks/statamic/4.yaml new file mode 100644 index 0000000..cb6114c --- /dev/null +++ b/frameworks/statamic/4.yaml @@ -0,0 +1,130 @@ +name: statamic +version: "4" +label: Statamic +public_dir: public +create: composer create-project statamic/statamic +php: + min: "8.0" + max: "8.2" + +detect: + - composer: statamic/cms + +env: + file: .env + example_file: .env.example + format: dotenv + key_generation: + env_key: APP_KEY + command: key:generate + fallback_prefix: "base64:" + services: + mysql: + detect: + - key: DB_CONNECTION + value_prefix: mysql + vars: + - DB_CONNECTION=mysql + - DB_HOST=lerd-mysql + - DB_PORT=3306 + - DB_DATABASE={{site}} + - DB_USERNAME=root + - DB_PASSWORD=lerd + postgres: + detect: + - key: DB_CONNECTION + value_prefix: pgsql + vars: + - DB_CONNECTION=pgsql + - DB_HOST=lerd-postgres + - DB_PORT=5432 + - DB_DATABASE={{site}} + - DB_USERNAME=postgres + - DB_PASSWORD=lerd + redis: + detect: + - key: REDIS_HOST + vars: + - REDIS_HOST=lerd-redis + - REDIS_PORT=6379 + - REDIS_PASSWORD= + mailpit: + detect: + - key: MAIL_HOST + vars: + - MAIL_MAILER=smtp + - MAIL_HOST=lerd-mailpit + - MAIL_PORT=1025 + - MAIL_USERNAME=null + - MAIL_PASSWORD=null + - MAIL_ENCRYPTION=null + +composer: auto +npm: auto +console: artisan + +workers: + queue: + label: Queue Worker + command: php artisan queue:work --queue=default --tries=3 --timeout=60 + restart: always + schedule: + label: Task Scheduler + command: php artisan schedule:work + restart: always + +logs: + - path: storage/logs/*.log + format: monolog + +setup: + - label: php artisan storage:link + command: php artisan storage:link + default: true + - label: php please install + command: php please install + default: true + - label: Refresh stache + command: php please stache:refresh + default: true +tinker: + command: ["artisan", "tinker"] + execute_flag: "--execute" + requires_package: laravel/tinker + requires_file: artisan + +commands: + - name: cache:clear + label: Clear all caches + command: php please cache:clear + description: Clear Statamic and Laravel caches + output: silent + icon: broom + - name: stache:warm + label: Warm Stache + command: php please stache:warm + description: Pre-build the Stache index + output: silent + icon: refresh + - name: search:update + label: Update search + command: php please search:update --all + description: Reindex all configured search indexes + output: silent + icon: refresh + +doctor: + checks: + - name: app_debug + type: env_combo + when: + APP_ENV: production + warn_if: + APP_DEBUG: "true" + detail: "APP_DEBUG is on while APP_ENV=production, so stack traces and config will leak. Turn debug off." + - name: storage_link + type: symlink + link: public/storage + target: storage/app/public + requires_dir: public + detail: "public/storage symlink is missing, so files on the public disk won't be web-accessible. Run php please storage:link." diff --git a/frameworks/symfony/4.yaml b/frameworks/symfony/4.yaml new file mode 100644 index 0000000..a42e523 --- /dev/null +++ b/frameworks/symfony/4.yaml @@ -0,0 +1,132 @@ +name: symfony +version: "4" +label: Symfony +public_dir: public +create: composer create-project symfony/skeleton +php: + min: "7.1" + max: "8.0" + +detect: + - file: symfony.lock + - composer: symfony/framework-bundle + composer_sections: [flex-require] + version_key: extra.symfony.require + +env: + file: .env.local + example_file: .env + format: dotenv + url_key: DEFAULT_URI + # DATABASE_URL carries no serverVersion: Doctrine picks its platform from that + # string when it is set, and it cannot be spelled for a drop-in (a MariaDB server + # given "11.8" is read as MySQL). Left out, Doctrine asks the server and is right + # for every database and version. + services: + mysql: + detect: + - key: DATABASE_URL + value_prefix: "mysql://" + - key: DATABASE_URL + value_prefix: "mariadb://" + vars: + - "DATABASE_URL=mysql://root:lerd@lerd-mysql:3306/{{site}}" + postgres: + detect: + - key: DATABASE_URL + value_prefix: "postgresql://" + - key: DATABASE_URL + value_prefix: "postgres://" + vars: + - "DATABASE_URL=postgresql://postgres:lerd@lerd-postgres:5432/{{site}}" + redis: + detect: + - key: REDIS_URL + - key: REDIS_DSN + vars: + - "REDIS_URL=redis://lerd-redis:6379" + mailpit: + detect: + - key: MAILER_DSN + vars: + - "MAILER_DSN=smtp://lerd-mailpit:1025" + meilisearch: + detect: + - key: MEILISEARCH_HOST + - key: MEILISEARCH_DSN + vars: + - "MEILISEARCH_HOST=http://lerd-meilisearch:7700" + +composer: auto +npm: auto +console: bin/console + +workers: + messenger: + label: Messenger + command: php bin/console messenger:consume async --time-limit=3600 + restart: always + check: + composer: symfony/messenger + +logs: + - path: var/log/*.log + format: monolog + +setup: + - label: Run migrations + command: php bin/console doctrine:migrations:migrate --no-interaction --allow-no-migration + default: true + check: + composer: doctrine/doctrine-migrations-bundle + - label: Load fixtures + command: php bin/console doctrine:fixtures:load --no-interaction + check: + composer: doctrine/doctrine-fixtures-bundle + - label: Clear cache + command: php bin/console cache:clear + default: true + - label: Install assets + command: php bin/console assets:install public + default: true + +tinker: + command: ["vendor/bin/psysh"] + execute_flag: "--execute" + requires_package: psy/psysh + requires_file: vendor/bin/psysh + +commands: + - name: cache:clear + label: Clear cache + command: bin/console cache:clear + description: Clear the Symfony cache for the current environment + output: silent + icon: broom + - name: doctrine:migrations:migrate + label: Run migrations + command: bin/console doctrine:migrations:migrate --no-interaction + description: Apply pending Doctrine migrations + output: silent + icon: database + check: + composer: doctrine/doctrine-migrations-bundle + - name: doctrine:fixtures:load + label: Load fixtures + command: bin/console doctrine:fixtures:load --no-interaction + description: Wipe data and load fixtures + output: silent + confirm: true + icon: refresh + check: + composer: doctrine/doctrine-fixtures-bundle + +doctor: + checks: + - name: app_debug + type: env_combo + when: + APP_ENV: prod + warn_if: + APP_DEBUG: "true" + detail: "APP_DEBUG is on while APP_ENV=prod, so stack traces and internals will leak. Turn debug off in production." diff --git a/frameworks/symfony/5.yaml b/frameworks/symfony/5.yaml new file mode 100644 index 0000000..11f8b1a --- /dev/null +++ b/frameworks/symfony/5.yaml @@ -0,0 +1,132 @@ +name: symfony +version: "5" +label: Symfony +public_dir: public +create: composer create-project symfony/skeleton +php: + min: "7.2" + max: "8.2" + +detect: + - file: symfony.lock + - composer: symfony/framework-bundle + composer_sections: [flex-require] + version_key: extra.symfony.require + +env: + file: .env.local + example_file: .env + format: dotenv + url_key: DEFAULT_URI + # DATABASE_URL carries no serverVersion: Doctrine picks its platform from that + # string when it is set, and it cannot be spelled for a drop-in (a MariaDB server + # given "11.8" is read as MySQL). Left out, Doctrine asks the server and is right + # for every database and version. + services: + mysql: + detect: + - key: DATABASE_URL + value_prefix: "mysql://" + - key: DATABASE_URL + value_prefix: "mariadb://" + vars: + - "DATABASE_URL=mysql://root:lerd@lerd-mysql:3306/{{site}}" + postgres: + detect: + - key: DATABASE_URL + value_prefix: "postgresql://" + - key: DATABASE_URL + value_prefix: "postgres://" + vars: + - "DATABASE_URL=postgresql://postgres:lerd@lerd-postgres:5432/{{site}}" + redis: + detect: + - key: REDIS_URL + - key: REDIS_DSN + vars: + - "REDIS_URL=redis://lerd-redis:6379" + mailpit: + detect: + - key: MAILER_DSN + vars: + - "MAILER_DSN=smtp://lerd-mailpit:1025" + meilisearch: + detect: + - key: MEILISEARCH_HOST + - key: MEILISEARCH_DSN + vars: + - "MEILISEARCH_HOST=http://lerd-meilisearch:7700" + +composer: auto +npm: auto +console: bin/console + +workers: + messenger: + label: Messenger + command: php bin/console messenger:consume async --time-limit=3600 + restart: always + check: + composer: symfony/messenger + +logs: + - path: var/log/*.log + format: monolog + +setup: + - label: Run migrations + command: php bin/console doctrine:migrations:migrate --no-interaction --allow-no-migration + default: true + check: + composer: doctrine/doctrine-migrations-bundle + - label: Load fixtures + command: php bin/console doctrine:fixtures:load --no-interaction + check: + composer: doctrine/doctrine-fixtures-bundle + - label: Clear cache + command: php bin/console cache:clear + default: true + - label: Install assets + command: php bin/console assets:install public + default: true + +tinker: + command: ["vendor/bin/psysh"] + execute_flag: "--execute" + requires_package: psy/psysh + requires_file: vendor/bin/psysh + +commands: + - name: cache:clear + label: Clear cache + command: bin/console cache:clear + description: Clear the Symfony cache for the current environment + output: silent + icon: broom + - name: doctrine:migrations:migrate + label: Run migrations + command: bin/console doctrine:migrations:migrate --no-interaction + description: Apply pending Doctrine migrations + output: silent + icon: database + check: + composer: doctrine/doctrine-migrations-bundle + - name: doctrine:fixtures:load + label: Load fixtures + command: bin/console doctrine:fixtures:load --no-interaction + description: Wipe data and load fixtures + output: silent + confirm: true + icon: refresh + check: + composer: doctrine/doctrine-fixtures-bundle + +doctor: + checks: + - name: app_debug + type: env_combo + when: + APP_ENV: prod + warn_if: + APP_DEBUG: "true" + detail: "APP_DEBUG is on while APP_ENV=prod, so stack traces and internals will leak. Turn debug off in production." diff --git a/frameworks/symfony/6.yaml b/frameworks/symfony/6.yaml new file mode 100644 index 0000000..2f9d3a5 --- /dev/null +++ b/frameworks/symfony/6.yaml @@ -0,0 +1,132 @@ +name: symfony +version: "6" +label: Symfony +public_dir: public +create: composer create-project symfony/skeleton +php: + min: "8.0" + max: "8.3" + +detect: + - file: symfony.lock + - composer: symfony/framework-bundle + composer_sections: [flex-require] + version_key: extra.symfony.require + +env: + file: .env.local + example_file: .env + format: dotenv + url_key: DEFAULT_URI + # DATABASE_URL carries no serverVersion: Doctrine picks its platform from that + # string when it is set, and it cannot be spelled for a drop-in (a MariaDB server + # given "11.8" is read as MySQL). Left out, Doctrine asks the server and is right + # for every database and version. + services: + mysql: + detect: + - key: DATABASE_URL + value_prefix: "mysql://" + - key: DATABASE_URL + value_prefix: "mariadb://" + vars: + - "DATABASE_URL=mysql://root:lerd@lerd-mysql:3306/{{site}}" + postgres: + detect: + - key: DATABASE_URL + value_prefix: "postgresql://" + - key: DATABASE_URL + value_prefix: "postgres://" + vars: + - "DATABASE_URL=postgresql://postgres:lerd@lerd-postgres:5432/{{site}}" + redis: + detect: + - key: REDIS_URL + - key: REDIS_DSN + vars: + - "REDIS_URL=redis://lerd-redis:6379" + mailpit: + detect: + - key: MAILER_DSN + vars: + - "MAILER_DSN=smtp://lerd-mailpit:1025" + meilisearch: + detect: + - key: MEILISEARCH_HOST + - key: MEILISEARCH_DSN + vars: + - "MEILISEARCH_HOST=http://lerd-meilisearch:7700" + +composer: auto +npm: auto +console: bin/console + +workers: + messenger: + label: Messenger + command: php bin/console messenger:consume async --time-limit=3600 + restart: always + check: + composer: symfony/messenger + +logs: + - path: var/log/*.log + format: monolog + +setup: + - label: Run migrations + command: php bin/console doctrine:migrations:migrate --no-interaction --allow-no-migration + default: true + check: + composer: doctrine/doctrine-migrations-bundle + - label: Load fixtures + command: php bin/console doctrine:fixtures:load --no-interaction + check: + composer: doctrine/doctrine-fixtures-bundle + - label: Clear cache + command: php bin/console cache:clear + default: true + - label: Install assets + command: php bin/console assets:install public + default: true + +tinker: + command: ["vendor/bin/psysh"] + execute_flag: "--execute" + requires_package: psy/psysh + requires_file: vendor/bin/psysh + +commands: + - name: cache:clear + label: Clear cache + command: bin/console cache:clear + description: Clear the Symfony cache for the current environment + output: silent + icon: broom + - name: doctrine:migrations:migrate + label: Run migrations + command: bin/console doctrine:migrations:migrate --no-interaction + description: Apply pending Doctrine migrations + output: silent + icon: database + check: + composer: doctrine/doctrine-migrations-bundle + - name: doctrine:fixtures:load + label: Load fixtures + command: bin/console doctrine:fixtures:load --no-interaction + description: Wipe data and load fixtures + output: silent + confirm: true + icon: refresh + check: + composer: doctrine/doctrine-fixtures-bundle + +doctor: + checks: + - name: app_debug + type: env_combo + when: + APP_ENV: prod + warn_if: + APP_DEBUG: "true" + detail: "APP_DEBUG is on while APP_ENV=prod, so stack traces and internals will leak. Turn debug off in production."