Skip to content

Instantly share code, notes, and snippets.

@hrmshandy
Forked from amite/laravel deploy.sh
Created October 9, 2015 02:42
Show Gist options
  • Save hrmshandy/5aebd2faf29931709043 to your computer and use it in GitHub Desktop.
Save hrmshandy/5aebd2faf29931709043 to your computer and use it in GitHub Desktop.

Revisions

  1. @amite amite renamed this gist Jan 22, 2014. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. @amite amite revised this gist Jan 22, 2014. 1 changed file with 0 additions and 8 deletions.
    8 changes: 0 additions & 8 deletions laravel deploy
    Original file line number Diff line number Diff line change
    @@ -36,10 +36,6 @@ EOF
    echo "--- Enabling mod-rewrite ---"
    sudo a2enmod rewrite

    echo "--- Setting document root ---"
    sudo rm -rf /var/www
    sudo ln -fs /vagrant/public /var/www


    echo "--- What developer codes without errors turned on? Not you, master. ---"
    sed -i "s/error_reporting = .*/error_reporting = E_ALL/" /etc/php5/apache2/php.ini
    @@ -53,7 +49,3 @@ sudo service apache2 restart
    echo "--- Composer is the future. But you knew that, did you master? Nice job. ---"
    curl -sS https://getcomposer.org/installer | php
    sudo mv composer.phar /usr/local/bin/composer

    # Laravel stuff here, if you want

    echo "--- All set to go! Would you like to play a game? ---"
  3. @amite amite created this gist Nov 4, 2013.
    59 changes: 59 additions & 0 deletions laravel deploy
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,59 @@
    #!/usr/bin/env bash

    echo "--- Good morning, master. Let's get to work. Installing now. ---"

    echo "--- Updating packages list ---"
    sudo apt-get update

    echo "--- MySQL time ---"
    sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password password root'
    sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password root'

    echo "--- Installing base packages ---"
    sudo apt-get install -y vim curl python-software-properties

    echo "--- Updating packages list ---"
    sudo apt-get update

    echo "--- We want the bleeding edge of PHP, right master? ---"
    sudo add-apt-repository -y ppa:ondrej/php5

    echo "--- Updating packages list ---"
    sudo apt-get update

    echo "--- Installing PHP-specific packages ---"
    sudo apt-get install -y php5 apache2 libapache2-mod-php5 php5-curl php5-gd php5-mcrypt mysql-server-5.5 php5-mysql git-core

    echo "--- Installing and configuring Xdebug ---"
    sudo apt-get install -y php5-xdebug

    cat << EOF | sudo tee -a /etc/php5/mods-available/xdebug.ini
    xdebug.scream=1
    xdebug.cli_color=1
    xdebug.show_local_vars=1
    EOF

    echo "--- Enabling mod-rewrite ---"
    sudo a2enmod rewrite

    echo "--- Setting document root ---"
    sudo rm -rf /var/www
    sudo ln -fs /vagrant/public /var/www


    echo "--- What developer codes without errors turned on? Not you, master. ---"
    sed -i "s/error_reporting = .*/error_reporting = E_ALL/" /etc/php5/apache2/php.ini
    sed -i "s/display_errors = .*/display_errors = On/" /etc/php5/apache2/php.ini

    sed -i 's/AllowOverride None/AllowOverride All/' /etc/apache2/apache2.conf

    echo "--- Restarting Apache ---"
    sudo service apache2 restart

    echo "--- Composer is the future. But you knew that, did you master? Nice job. ---"
    curl -sS https://getcomposer.org/installer | php
    sudo mv composer.phar /usr/local/bin/composer

    # Laravel stuff here, if you want

    echo "--- All set to go! Would you like to play a game? ---"