brefphp / laravel-bridge

Package to use Laravel on AWS Lambda with Bref
https://bref.sh/docs/frameworks/laravel.html
MIT License
314 stars 63 forks source link

Using Bref with Docker #41

Closed bkuhl closed 3 years ago

bkuhl commented 3 years ago

Hey folks, thanks for putting together such an extensive project with brefphp, it's really paved the way for using Lambda. I'm building a prototype with Lambda to try to understand it further. I've built a docker container for my app with the following...

FROM bref/php-80

ADD . /var/task

    # production-ready dependencies
RUN curl -s https://getcomposer.org/installer | php \
    && php composer.phar install  --no-interaction --optimize-autoloader --no-dev --prefer-dist --no-cache \
    && rm composer.phar

ENTRYPOINT ["php", "worker.php"]

I wanted to put the Dockerfile here in case it's useful to other folks who are trying to use lambda in a containerized fashion. For what it's worth, I haven't gotten this actually working yet, though in CloudWatch I'm not seeing any errors. I've reached my time box on when I'm able to investigate this exploration, I hope to continue another time!