## Update NPM on Intranet machines:

(upgrading to npm v6.11.2)

`npm install -g npm`

## Update NPM on web server machines:

install libnotify: `sudo apt-get install libnotify-bin`

(upgrading to npm v6.11.2)

`npm install -g npm`

## Update API machines to latest nodejs:
   1. check `node` version - if not v10:
   ```
   cd ~
   curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
   sudo apt-get install -y nodejs
   ```

## Update API machines to latest laravel version
   1. Make sure swap memory is enabed (`free -mh`). If not, enable it. (see https://github.com/bobasic/paradigm/wiki/Server-Build-Steps)
   2. Check composer version with `composer`
      1. if on old version, install new version: instructions: `https://getcomposer.org/download/` then `mv composer.phar /usr/local/bin/composer`
      2. then logout/login
   3. Wait till after code has been updated, then:
    ```
    php artisan down
    service apache2 stop
    git pull
    composer clear-cache
    composer install
    service apache2 start
    php artisan up
    ```

## Website -
1. Add `app_env = production` (switch out correct env) to `/var/www/html/paradigm/website/app.ini`

## Update Intranet machines to latest laravel version

1. Make sure swap memory is enabed (`free -mh`). If not, enable it. (see https://github.com/bobasic/paradigm/wiki/Server-Build-Steps)
2. Check composer version with `composer`
   1. if on old version, install new version: instructions: `https://getcomposer.org/download/` then `mv composer.phar /usr/local/bin/composer`
   2. then logout/login
3. Wait till after code has been updated, then:
      ```
      php artisan down
      service apache2 stop
      composer clear-cache

      rm -rf node_modules
      git reset --hard
      git pull
      composer install

      npm install --unsafe-perm
      npm run prod
      
      service apache2 start
      php artisan up
      ```

# Update Artist IDs

1. Run `php artisan onetime:PopulateidsTables`

# Update ENV file with file locations:

```
AGENCIES_LOGO_URL_PARADIGM="/img/intranet/icon-paradigm-logo-v2.png"
AGENCIES_LOGO_URL_CODA="/img/intranet/icon-paradigm-logo-v2.png"
AGENCIES_LOGO_URL_XRAY="/img/intranet/icon-xray-logo.png"
```