Giter Club home page Giter Club logo

vagrant-ansible-laravel's Introduction

Vagrant-Ansible-Laravel

Click here to check out the PHP7 version of this box with more features.

Ansible provisioning of the Vagrant box for multiple Laravel projects. It is designed so that you don't need to have things like webserver or Composer installed on your local system. You'll be able to do everything from within the virtual box.

That setup is heavily inspired by https://github.com/hashbangcode/vlad and Laravel Homestead.

What's inside

  • Ubuntu 14.04 64-bit
  • Nginx
  • PHP-FPM 5.6
  • MySQL + Adminer
  • Codeception + PhantomJS
  • NodeJS + Grunt + Bower + Gulp
  • Composer + Laravel installer
  • Git, Vim, Midnight Commander, etc.

Prerequisites

  1. Linux or Mac

  2. Vagrant (latest version)

  3. Ansible (installation instructions)

  4. Virtual Box (download)

  5. NFS (This comes pre-installed on Mac OS X 10.5+ (Leopard and higher))

    sudo apt-get install nfs-kernel-server nfs-common portmap

  6. vagrant-triggers plugin

    vagrant plugin install vagrant-triggers

Setup steps

  1. Copy provision/example.settings.yml to provision/settings.yml

    cd provision && cp example.settings.yml settings.yml

  2. Open settings.yml with your favorite editor.

  • Provide your details for git setup.
  • Pick a webserver hostname. Phpinfo will be available at this URL.
  • Setup virtual hosts. See Virtual hosts section
  • Change the box IP address (if needed).
  • Change to box name to your liking.
  • Set the amount of RAM for the box (MB).
  • Change any other settings, though default are usually sufficient.
  1. Run vagrant up. You will be asked for your system password in the beginning and in the end of the installation.
  2. Run vagrant ssh to login to your box. All sites folders are in ~/sites derectory.

Virtual hosts

You can have as many sites as you want on a single box.

# Virtual hosts
vhosts:
  - alias: first-project.local
    path: ~/projects/first_project
    db: project1
  - alias: second-project.local
    path: ~/projects/second_project
    db: project2

Your project folders must exist but shouldn't contain any code. You will create a new application or clone the existing one from within the virtual box.

Virtual hosts are updated every time you run vagrant up or vagrant reload.

Creating an application

Assuming that you've already created a virtual host for your app project.local, go to ~/sites/project.local.

Your application must reside in that folder, no subfolders.

~/sites/project.local/public/index.php

Open your browser and go to project.local/. Job done.

vagrant-ansible-laravel's People

Contributors

mkudenko avatar

Watchers

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