routes:
    "https://{all}/": { type: upstream, upstream: "slug:http" }
    "http://{all}/": { type: redirect, to: "https://{all}/" }

services: 
    foo:
        type: bar:baz

    foo1:
        type: bar1:baz1

    foo2:
        type: postgresql:baz2

    

applications:
    slug:
        source:
            root: "/"

        type: php:8.0

        runtime:
            extensions:
                - apcu
                - blackfire
                - ctype
                - iconv
                - mbstring
                - pdo_pgsql
                - sodium
                - xsl
                

        variables:
            php:
                opcache.preload: config/preload.php
        build:
            flavor: none

        web:
            locations:
                "/":
                    root: "public"
                    expires: 1h
                    passthru: "/index.php"

        mounts:
            "/var": { source: storage, source_path: var }
            

        relationships:
            foo: "foo:bar"
            foo1: "foo1:bar1"
            foo2: "foo2:postgresql"
            
        hooks:
            build: |
                set -x -e

                curl -fs https://get.symfony.com/cloud/configurator | bash
                
                NODE_VERSION=18 symfony-build

            deploy: |
                set -x -e

                symfony-deploy

        crons:
            security-check:
                # Check that no security issues have been found for PHP packages deployed in production
                # See https://github.com/fabpot/local-php-security-checker
                spec: '50 23 * * *'
                cmd: if [ "$PLATFORM_ENVIRONMENT_TYPE" = "production" ]; then croncape php-security-checker; fi

        
