-
Install XCode + CLI tools, if not already done.
-
Install homebrew.
-
Make sure you have a LAMP (Apache, MySQL, PHP) installation running. Madison has not been tested with Nginx. MySQL drop-in alternatives like MariaDB may work, but have not been tested. PHP 5.3+ is required. Additionally, make sure your PHP installation includes the mcrypt and libyaml modules.
-
With homebrew, you can do
brew install php56 php56-mcrypt
-
Make sure in your apache settings that your apache config is loading the
php5
module from you homebrew installed version, like so:LoadModule php5_module /usr/local/php5/libphp5.so
-
Install composer
-
Or just put this in your terminal:
curl -sS https://getcomposer.org/installer | php
-
Install node and npm. We recommend using nvm
-
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.29.0/install.sh | bash
-
Restart your terminal
-
nvm install stable
-
nvm alias default stable && nvm use default
-
Install bower (easiest through npm). Yes, that's 3 package managers we've installed.
-
npm install -g bower
-
Run
npm install
so that it can grab the packages in packages.json. -
Run
composer install
to install all our PHP dependencies. -
Run
grunt install
which will run some more install commands, downloading and installing the required packages. You may run into an issue with Github's API ratelimiting your requests for composer install, see this workaround. -
If you don't have the
grunt
command, donpm install -g grunt-cli
-
Install compass. If you do not have any ruby gems installed, you can get away with
sudo gem update --system
andsudo gem install compass
, installing the compass gem on top of Mac OSX's ruby. -
In general, you will want to use something like rvm to manage a separate version of ruby which does not interfere with OSX. If you use rvm, drop the
sudo
from the aforementioned commands. -
Set up the site as an Apache vhost.
-
Create a clean database in MySQL.
-
Rename
example_creds.php
tocreds.php
and enter your DB info, as well as admin info for the initial admin user seed. Additionally, do the same forexample_smtp.php
if you want to enable email functionality (required for registering new users). -
Run
php artisan migrate
andphp artisan db:seed
from the root directory to set up the database. -
Install and run elasticsearch. See here for installation.
-
Additionally, run
curl -XPUT http://localhost:9200/madison
when ES is running to create a new index. -
Copy the
.env.example
file to.env
and set the appropriate variables. -
If you don't have one already, set up an account at MailTrap and set the
MAIL_USERNAME
andMAIL_PASSWORD
variables to what it provides for your test inbox. This is needed for user signup.
When editing any .js files, make sure to run grunt watch
so that it can watch for and
re-minify (among other things) the main build/app.js and build/app.map files.