Skip to content

Instantly share code, notes, and snippets.

@djbobbydrake
Created March 7, 2017 18:28
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save djbobbydrake/7c0d39537c58071635644443ddef4225 to your computer and use it in GitHub Desktop.
Save djbobbydrake/7c0d39537c58071635644443ddef4225 to your computer and use it in GitHub Desktop.
Setting up Laravel on Codeship
# We support all major PHP versions. Please see our docs for a full list
# https://documentation.codeship.com/classic/languages-frameworks/php/
phpenv local 7.0
echo "memory_limit = 512M" >> /home/rof/.phpenv/versions/$(phpenv version-name)/etc/php.ini
# install dependencies
COMPOSER_HOME=${HOME}/cache/composer
composer install --prefer-dist --no-interaction
# set up environment variables
touch .env
echo "APP_ENV=testing" >> .env
echo "APP_DEBUG=true" >> .env
echo "APP_KEY=add32characterstringhere" >> .env
echo "DB_HOST=localhost" >> .env
echo "DB_DATABASE=test" >> .env
echo "DB_USERNAME=$MYSQL_USER" >> .env
echo "DB_PASSWORD=$MYSQL_PASSWORD" >> .env
# set up laravel
mkdir -p ./storage/framework/views
mkdir -p ./storage/framework/sessions
mkdir -p ./build/logs
chmod -R 777 ./storage
php artisan migrate
php artisan db:seed
php artisan cache:clear
php artisan optimize --force
mysql -u $MYSQL_USER -e'SET GLOBAL max_connections=1000;'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment