Skip to content

Commit

Permalink
Add layer for Symfony Runtime (#231)
Browse files Browse the repository at this point in the history
* Add layer for Symfony Runtime

* Adding fake test

* Added docs
  • Loading branch information
Nyholm authored May 25, 2021
1 parent 87d2e9c commit b342712
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ functions:
| Redis | `${bref-extra:redis-php-74}` |
| Scrypt | `${bref-extra:scrypt-php-74}` |
| SPX | `${bref-extra:spx-php-74}` |
| Symfony Runtime | `${bref-extra:symfony-runtime-php-74}`|
| Microsoft SQLSRV | `${bref-extra:sqlsrv-php-74}` |
| UUID | `${bref-extra:uuid-php-74}` |
| Xdebug | `${bref-extra:xdebug-php-74}` |
Expand Down Expand Up @@ -106,6 +107,10 @@ There is more information about the driver ini configuration in the [snowflake c
but the default configuration is enough in most cases.
The easiest way review those is to download the [`snowflake_odbc` directory](https://sfc-repo.snowflakecomputing.com/odbc/linux/index.html).

### Symfony Runtime

Read [docs at runtime/bref](https://github.com/php-runtime/bref).

### SQL Server setup

The SQL Server layer includes both the SQLSRV extension and the PDO_SQLSRV extension ([source](https://github.com/microsoft/msphpsql)).
Expand Down
4 changes: 4 additions & 0 deletions layers/symfony-runtime/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Build the final image with just the files we need
FROM scratch

COPY bootstrap /opt/bootstrap
13 changes: 13 additions & 0 deletions layers/symfony-runtime/bootstrap
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh

# Fail on error
set -e

LAMBDA_ARGV=(${_HANDLER//:/ })

while true
do
# We redirect stderr to stdout so that everything
# written on the output ends up in Cloudwatch automatically
/opt/bin/php "${LAMBDA_ARGV[0]}" 2>&1
done
7 changes: 7 additions & 0 deletions layers/symfony-runtime/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"php": [
"73",
"74",
"80"
]
}
4 changes: 4 additions & 0 deletions layers/symfony-runtime/test.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?php

// Always pass
exit(0);

0 comments on commit b342712

Please sign in to comment.