Coder Social home page Coder Social logo

envomer / laravel-lambda-docker-bref Goto Github PK

View Code? Open in Web Editor NEW

This project forked from umihico/laravel-lambda-docker-bref

0.0 1.0 0.0 82 KB

Demo Laravel application on AWS Lambda function with Docker container image using Bref

Home Page: https://w0qw04g8sj.execute-api.ap-northeast-1.amazonaws.com/

Shell 1.27% Dockerfile 0.06% PHP 80.45% Blade 18.21%

laravel-lambda-docker-bref's Introduction

Delpoy Laravel on AWS Lambda with Docker using Bref

Step 1. Create your project

curl -s https://laravel.build/larademo | bash

Step 2. install requirements and generate serverless.yml

cd larademo
./vendor/bin/sail up -d
./vendor/bin/sail composer require bref/bref bref/laravel-bridge
./vendor/bin/sail php artisan vendor:publish --tag=serverless-config
./vendor/bin/sail down

Step 3. Create Dockerfile and modify serverless.yml

FROM bref/php-80-fpm
COPY . /var/task
CMD [ "public/index.php" ]
service: laravel

provider:
    name: aws
    # The AWS region in which to deploy (us-east-1 is the default)
    region: {opt:region, us-east-1}
    # The stage of the application, e.g. dev, production, staging… ('dev' is the default)
    stage: dev
    runtime: provided.al2

    ecr:
        images:
            laravel:
                path: ./
package:
    # Directories to exclude from deployment
    exclude:
        - node_modules/**
        - public/storage
        - resources/assets/**
        - storage/**
        - tests/**

functions:
    # This function runs the Laravel website/API
    web:
        image:
            name: laravel
        events:
            -   httpApi: '*'

Step 4. Deploy!

sls deploy --region ap-northeast-1 # use your region

References

laravel-lambda-docker-bref's People

Contributors

umihico avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.