Coder Social home page Coder Social logo

simplelamp's Introduction

Simple LAMP

Description

This vagrant setup is a simple LAMP implementation to get you started with building, testing, and maintaining LAMP projects and more. The purpose is to have something light weight compared to the other vagrant php boxes like Homestead. Fork me!

What's in the Box?

  • ubuntu/trusty64 on Ubuntu 14.04
  • Apache 2.4
  • PHP 7.0.11
    • Modules

      • [PHP Modules] bcmath calendar Core ctype date dom exif fileinfo filter ftp gd gettext gmp hash iconv intl json libxml mbstring mcrypt mysqli mysqlnd openssl pcntl pcre PDO pdo_mysql Phar posix readline Reflection session shmop SimpleXML soap sockets SPL standard sysvmsg sysvsem sysvshm tokenizer wddx xml xmlreader xmlrpc xmlwriter xsl Zend OPcache zip zlib
      • [Zend Modules] Zend OPcache
  • MySQL 5.6.28

Requirements

  • Mac OSX/Linux (this probably won't work well with Windows but I haven't tested it)
  • Vagrant 1.8.1
  • VirtualBox
  • vagrant plugins:
    • vagrant-hostmanager
      • install by running vagrant plugin install vagrant-hostmanager
  • NFS mounting
    • Feel free to change this by searching the Vagrantfile and removing nfs in the shared folders area.

Getting Started

To get started, make sure all of the requirements about are fulfilled and edit the config.yml file directly. YOU MUST EDIT THE config.yml FILE FOR THIS SETUP TO WORK. Documentation to come.

Once the config.yml file is edited, you can run:

vagrant up

Config File (config.yml)

Properties

  • name (required) - string - Change this to fit the name of the project you are working on.
  • overwrite (optional) - string - Path to a config.yml that will overwrite it completely. This is nice if you want to use this repo as a git submodule.
  • local_path (required) - string - the local path to the project root. The project root will have anything that might be needed to be accessed from the server. This is not the document root for apache.
  • remote_path (required) - string - the remote path to the project on the vagrant box.
  • phpVersion - enum - options are php versions (list is space sperated) 7.1 7.0 5.6 5.5
  • sites (required) - array - the apache config variables for the infinite amount of virtual hosts you want to run on the vagrant box.
    • site name - You name this key and can be whatever you want it to be. An example of having multiple sites is when you have an api and a web entry point. The site names could be "web" and "api"
      • docroot (required) - string - Value for the apache virtual host DocumentRoot. This is the remote path, the path that is on the vagrant box.
      • domains (required) - array - Value for the apache virtual host ServerAlias. Currently we don't set the ServerName for the apache virtual host which is fine when we have the aliases that are correct.
      • force_https (optional) - boolean value - Added a redirect from http to https when true.
  • install
    • elasticsearch - bool - install server or not
    • elasticsearchVersion - enum - install a specified version of elasticsearch. Options are 1.7, 2, or 5. Defaults to 5.
    • msyql - bool - install server or not
    • postgresql - bool - install server or not

Example config.yml

# vi:syntax=yaml ft=yaml
name: default
overwrite: ../.simplelamp.yml

# Project paths
# path on you computer, we like to commit the Vagrantfile and dependencies to the project repo.
local_path: ../

# path on the vagrant box
remote_path: /var/www/html

# options: "7.1", "7.0", "5.6", or "5.5"
# defaults to 7.1
phpVersion: 7.1

# Sites
sites:
    # site label, you can have unlimited sets of sites childern
    example:
        # this can also have a local path for the http conf
        docroot: /var/www/html/web
        domains:
            - katgifs.localhost
            - local.katgifs.com
        #boolean
        force_https: true

install:
    elasticsearch: false

    # options: "1.7", "2", or "5"
    # defaults to 5
    elasticsearchVersion: 1.7

    #mysql is installed by default
    mysql: true
    postgresql: false

Disclaimer

This is for development purposes only. Please don't use this in production and read the LICENSE

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.