stakkr-org/stakkr

View on GitHub
stakkr/static/recipes/symfony.yml

Summary

Maintainability
Test Coverage
config:
  services:
    nginx:
      enabled: true
      document_root: /var/www/app/public
    php:
      enabled: true
      version: 7.4
      ram: 1024M
  proxy:
    enabled: true
    domain: localhost

  aliases:
    composer:
      description: Run a PHP composer command
      exec:
        - container: php
          user: www-data
          args: [php, /home/www-data/bin/composer]

services:
  - php
  - webservers

commands:
  Update apt:
    container: php
    args: [apt, update, -qq]
  Install required packages:
    container: php
    args: [apt, install, -qq, -y, unzip, git]
  Download composer:
    container: php
    user: www-data
    args: [php, -r, "copy('https://getcomposer.org/download/1.8.0/composer.phar', '/home/www-data/bin/composer');"]
  Set composer as executable:
    container: php
    user: www-data
    args: [chmod, +x, /home/www-data/bin/composer]
  Install symfony:
    container: php
    user: www-data
    args: [/home/www-data/bin/composer, '-q', create-project, symfony/website-skeleton, /var/www/app]

messages:
  - Symfony is ready and running with a LEMP stack (Nginx, PHP, MySQL)
  - If you need a database, install services "databases" with the command "stakkr services-add databases"