Skip to content
Kevin Dice edited this page Mar 30, 2016 · 8 revisions

Vagrant

We have pre-configured a Vagrant configuration to aid in environment setup for development. You can find it, as well as instructions for usage, here.

Manual Configuration

For development, the recommended setup is Vagrant. Follow the instructions above.

Memory Requirements

On a 512MB VPS instance hosted with a popular cloud provider, running composer install failed after the system ran out of memory. A 1GB or higher instance is required.

Setup HHVM

Nucleus runs on Hack, which requires HHVM. To install HHVM, follow the instructions on their website.

Setup Nginx

All Nucleus requests route through app.php in the root of the project, with static resources being pulled from the public folder. This requires a custom Nginx rule. Here is an example:

server {
  listen 80;

  root /var/www;

  server_name nucleus.example.com;
  include hhvm.conf;

  location / {
    try_files /public/$uri /app.php$is_args$args;
  }
}

Note the include hhvm.conf;. The HHVM install should have created this file in /etc/nginx on installation. If not, these are good instructions on how to configure nginx to use HHVM.

For this example configuration, you would need to change nucleus.example.com with whatever domain you're going to use to run Nucleus.

Setup MySQL

Nucleus is backed by MySQL. The schema can be found here.

Setup NPM / Gulp

Nucleus' frontend is built with gulp with dependencies from npm. You can install Node.js by following the instructions on their website. Once installed, install gulp globally by running npm install -g gulp.