GithubHelp home page GithubHelp logo

pkdevboxy / laravel Goto Github PK

View Code? Open in Web Editor NEW

This project forked from luciddreamz/laravel

0.0 2.0 0.0 478 KB

OpenShift QuickStart - Laravel 5.0 Framework

Shell 2.65% PHP 34.49% JavaScript 0.24% ApacheConf 0.17% CSS 62.46%

laravel's Introduction

Laravel 5.0 on OpenShift

Laravel is a free, open source PHP web application framework, designed for the development of model–view–controller (MVC) web applications.

This QuickStart was created to make it easy to get started with Laravel 5.0 on OpenShift.

The simplest way to install this application is to use the OpenShift QuickStart. If you'd like to install it manually, follow these directions.

OpenShift Considerations

These are some special considerations you may need to keep in mind when running your application on OpenShift.

Local vs. Remote Development

This Laravel QuickStart provides separate .env configuration files for both local and remote development, found at .env and .openshift/.env respectively. When the local repo is pushed to OpenShift .env is overwritten with the .openshift/.env file.

Remote Development

Your application is configured to automatically use your OpenShift MySQL or PostgreSQL database in when deployed on OpenShift using OpenShift Environment Variables.

Additionally, your APP_ENV, APP_URL, and APP_KEY will be set automatically in production on OpenShift.

The Laravel CACHE_DRIVER is set to use APC opcode caching and the SESSION_DRIVER is set to use the local file system for storage. Feel free to update these settings in .openshift/.env.

Laravel Migrations

When the application is pushed to OpenShift, php artisan migrate --force is automatically executed.

Composer

When the application is pushed, composer install is automatically executed over the root directory. See PHP Markers for more details on the 'use_composer' marker.

'Development' Mode

When you develop your Laravel application in OpenShift, you can also enable the 'development' environment by setting the APPLICATION_ENV environment variable, using the rhc client, like:

$ rhc env set APPLICATION_ENV=development -a <app-name>

Then, restart your application:

$ rhc app restart -a <app-name>

If you do so, OpenShift will run your application under 'development' mode. In development mode, your application will:

  • Set Laravel's APP_ENV to 'development' and APP_DEBUG to 'true'
  • Ignore your composer.lock file
  • Show more detailed errors in browser
  • Display startup errors
  • Enable the Xdebug PECL extension
  • Enable APC stat check

Set the variable to 'production' and restart your app to deactivate error reporting and resume production PHP settings.

Using the development environment can help you debug problems in your application in the same way as you do when developing on your local machine. However, we strongly advise you not to run your application in this mode in production.

Log Files

Your application is configured to use the OpenShift log directory. You can use the rhc tail command to stream the latest log file entries:

rhc tail -a <APP_NAME>

To stop tailing the logs, press Ctrl + c.

Manual Installation

  1. Create an account at https://www.openshift.com/

  2. Create a Laravel application:

    rhc app create laravelapp php-5.4 mysql-5.5 --from-code=https://github.com/luciddreamz/laravel
    

    or

    rhc app create laravelapp php-5.4 postgresql-9.2 --from-code=https://github.com/luciddreamz/laravel
    

Additional Resources

Documentation for the Laravel framework can be found on the Laravel website. Check out OpenShift's Developer Portal for help running PHP on OpenShift.

laravel's People

Contributors

hunterjm avatar luciddreamz avatar vignesh0025 avatar

Watchers

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