<commit_before># Setup vault

Install globally with nodejs

    npm install -g gulp bower

Run these commands

    npm install
    npm run setup
    
Install framework deps:

    composer install
    
Configure application, all overridable configuration is available at **app/config** 

    cp -R app/config/example app/config/local

<commit_msg>Nginx setup, more setup instructions<commit_after># Setup vault

Install globally with nodejs

    npm install -g gulp bower

Run these commands

    npm install
    npm run setup
    
Install framework deps:

    composer install
    
Configure application, all overridable configuration is available at **app/config** 

    cp -R app/config/example app/config/local

Create database:

    mysql -u root -p --execute='create database vault;'
    php artisan migrate
    php artisan db:seed
    
Serve with nginx:

    sudo vim /etc/nginx/sites-available/vault.conf
    
Add config to **/etc/nginx/sites-available/vault.conf**:

``` nginx
server {
    listen   80;
    server_name  vault.dev;

    root   /var/www/vault/public;

    error_log /var/log/vault-error.log;
    access_log /var/log/vault-access.log;

    # first check if its a static file, otherwise run through @handler
    location / {
        index index.php;
        try_files $uri @handler;
        #expires 24h;
    }

    # if it was not a static file, execute through index.php
    location @handler {
        rewrite ^(.*)$ /index.php last; # force index.php if it was not a file
    }

    location ~ \.php$ {
        fastcgi_pass   127.0.0.1:9000;
        include        /etc/nginx/fastcgi_params;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;
    }
}
```

Link config:

    sudo ln -s /etc/nginx/sites-available/vault.conf /etc/nginx/sites-enabled/vault.conf

Reload with new config:

    sudo service nginx reload
    
Add hostname to [see issue](http://pm.datajob.lt/datadog/vault/issues/19):

    vim bootstrap/start.php # at line 29
    
How to login:

    Username: admin
    Password: <PASSWORD>
{'fraction_non_alphanumeric': 0.0854126679462572, 'fraction_numerical': 0.008637236084452975, 'mean_word_length': 2.5886402753872635, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 1, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1126113', 'n_tokens_mistral': 713, 'n_tokens_neox': 646, 'n_words': 202}