Giter VIP home page Giter VIP logo

eb_ebextensions_platform_files_for_laravel_nginx's Introduction

Elastic beanstalk .ebextensions and .platform files for laravel and nginx

Necassary files to run laravel project correctly with elastic beanstalk and nginx.

How to use it

  • Copy .ebextensions and .platform directories in your laravel's project root.
  • Open .ebextensions/00_settings.config and fill your elastic beanstalk's configurations, for instance database and URL.
  • Open .platform/nginx/conf.d/my-vhost.conf and update the domain names that you use (not needed in case you want to run your application on default URL that elastic beanstalk have created for you).

Optional but helpful

  • Following commands can be used to setup permissions or this method can be used to create many other commands
container_commands:
  03_make_storage_writeable:
    command: "chmod -R 775 storage"
    cwd: /var/app/staging
  04_make_bootstrap_cache_writable:
    command: "chmod -R 775 bootstrap/cache"
    cwd: /var/app/staging
  • One can use below to create shell scripts that will run post deployment
files:
  "/opt/elasticbeanstalk/hooks/appdeploy/post/99_make_storage_writable.sh":
    mode: "000755"
    owner: root
    group: root
    content: |
      #!/usr/bin/env bash
      echo "Making /storage writeable..."
      chmod -R 775 /var/app/current/storage

      if [ ! -f /var/app/current/storage/logs/laravel.log ]; then
          echo "Creating /storage/logs/laravel.log..."
          touch /var/app/current/storage/logs/laravel.log
          chown webapp:webapp /var/app/current/storage/logs/laravel.log
      fi

      if [ ! -d /var/app/current/public/storage ]; then
          echo "Creating /public/storage symlink..."
          ln -s /var/app/current/storage/app/public /var/app/current/public/storage
      fi
  • Install some library that exsists in the OS packages
packages: 
  yum:
    epel-release: []
    mod24_ssl: []

eb_ebextensions_platform_files_for_laravel_nginx's People

Contributors

mrimran 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.