From 4ef8e879e3807561fc0f8e8cf9a83f4351594e4e Mon Sep 17 00:00:00 2001 From: Nyholm Date: Tue, 25 May 2021 10:39:20 +0200 Subject: [PATCH 1/3] Add layer for Symfony Runtime --- layers/symfony-runtime/Dockerfile | 4 ++++ layers/symfony-runtime/bootstrap | 13 +++++++++++++ layers/symfony-runtime/config.json | 7 +++++++ 3 files changed, 24 insertions(+) create mode 100644 layers/symfony-runtime/Dockerfile create mode 100644 layers/symfony-runtime/bootstrap create mode 100644 layers/symfony-runtime/config.json diff --git a/layers/symfony-runtime/Dockerfile b/layers/symfony-runtime/Dockerfile new file mode 100644 index 00000000..aff81afc --- /dev/null +++ b/layers/symfony-runtime/Dockerfile @@ -0,0 +1,4 @@ +# Build the final image with just the files we need +FROM scratch + +COPY bootstrap /opt/bootstrap diff --git a/layers/symfony-runtime/bootstrap b/layers/symfony-runtime/bootstrap new file mode 100644 index 00000000..67918852 --- /dev/null +++ b/layers/symfony-runtime/bootstrap @@ -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 diff --git a/layers/symfony-runtime/config.json b/layers/symfony-runtime/config.json new file mode 100644 index 00000000..6abe3e86 --- /dev/null +++ b/layers/symfony-runtime/config.json @@ -0,0 +1,7 @@ +{ + "php": [ + "73", + "74", + "80" + ] +} From ca444851449d30c14e6f241ea615bbc69eaf2f33 Mon Sep 17 00:00:00 2001 From: Nyholm Date: Tue, 25 May 2021 10:44:51 +0200 Subject: [PATCH 2/3] Adding fake test --- layers/symfony-runtime/test.php | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 layers/symfony-runtime/test.php diff --git a/layers/symfony-runtime/test.php b/layers/symfony-runtime/test.php new file mode 100644 index 00000000..1b3ac281 --- /dev/null +++ b/layers/symfony-runtime/test.php @@ -0,0 +1,4 @@ + Date: Tue, 25 May 2021 10:47:36 +0200 Subject: [PATCH 3/3] Added docs --- Readme.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Readme.md b/Readme.md index 0c4a896c..f5d57086 100644 --- a/Readme.md +++ b/Readme.md @@ -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}` | @@ -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)).