Skip to content

Instantly share code, notes, and snippets.

@chamoysvoice
Created October 8, 2018 21:44
Show Gist options
  • Save chamoysvoice/e53ffde46edeeb2c10aead386aeda27d to your computer and use it in GitHub Desktop.
Save chamoysvoice/e53ffde46edeeb2c10aead386aeda27d to your computer and use it in GitHub Desktop.
This is a configuration file to use mysql 5.7 in codeship for laravel projects :)
#Install mysql 5.7.16
\curl -sSL https://raw.githubusercontent.com/codeship/scripts/master/packages/mysql-5.7.sh | bash -s
export PATH=/home/rof/mysql-5.7.17/bin:$PATH
# Optional: Set the php version
phpenv local 7.1
mkdir -p ./bootstrap/cache
mysql --defaults-file="/home/rof/mysql-5.7.17/my.cnf" -u "${MYSQL_USER}" -p"${MYSQL_PASSWORD}" -e "create database codeship";
touch .env
echo "APP_ENV=testing">> .env
echo "APP_DEBUG=true" >> .env
echo "APP_KEY=YOUR_API_KEY" >> .env
echo "APP_URL=YOUR_PREFER_URL" >> .env
echo "DB_CONNECTION=mysql" >> .env
echo "DB_HOST=127.0.0.1" >> .env
echo "DB_DATABASE=codeship" >> .env
echo "DB_USERNAME=$MYSQL_USER">> .env
echo "DB_PASSWORD=$MYSQL_PASSWORD" >> .env
echo "DB_PORT=3307" >> .env
composer install --no-interaction
php artisan migrate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment