Skip to content

Commit

Permalink
[Bref] Clarify serverless configuration for Symfony (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
vhenzl authored Jul 15, 2021
1 parent 2da6913 commit f5393df
Showing 1 changed file with 25 additions and 5 deletions.
30 changes: 25 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ composer require bref/extra-php-extensions

### Symfony application

Use the standard Symfony 5.3+ index.php.
Use the standard Symfony 5.3+ `public/index.php`.

```php
// public/index.php
Expand All @@ -78,6 +78,22 @@ return function (array $context) {
};
```

```diff
# serverless.yml

functions:
web:
handler: public/index.php
timeout: 28
layers:
- - ${bref:layer.php-80-fpm}
+ - ${bref:layer.php-80}
+ - ${bref-extra:symfony-runtime-php-80}
events:
- httpApi: '*'
```


### PSR-15 application

```php
Expand Down Expand Up @@ -133,7 +149,7 @@ to serverless.yml

### Console application

Use the standard Symfony 5.3+ bin/console.
Use the standard Symfony 5.3+ `bin/console`.

```php
// bin/console
Expand All @@ -154,7 +170,11 @@ return function (array $context) {
# serverless.yml

functions:
app:
- handler: public/index.php
+ handler: bin/console
console:
handler: bin/console
timeout: 120
layers:
- ${bref:layer.php-80}
- - ${bref:layer.console}
+ - ${bref-extra:symfony-runtime-php-80}
```

0 comments on commit f5393df

Please sign in to comment.