
1. Make sure swap is enalbed on API machines (`free -m`)
2. Make sure you run `composer install` after update on API machines.





# Only if doing the thumbnails change:

1. API Updates for thumbnails:
2. Create EFS security group for the current env (`staging api EFS`) - https://us-west-2.console.aws.amazon.com/ec2/v2/home?region=us-west-2#SecurityGroups:sort=tag:Name
3. Add this environment's security group (`staging-api-lb` AND `staging-api-instances`) to access incoming "NFS" on this security group.
4. Create EFS drive with that security group (tag with `name`:`staging api`)
5. On all api machines, run: (REPLACE DNSNAME with the name from the EFS pane on )
  ```
  sudo su
  cd /
  mkdir efs
  apt-get install nfs-common
  sudo mount -t nfs4 -o nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2 fs-a5b5740e.efs.us-west-2.amazonaws.com:/ efs
  chown -R www-data:www-data /efs/
  service apache2 restart
  ```
1. on API machine, run `sudo apt-get install php7.2-gd`
1. Create folder called `image_cache` in `/efs` and then run `chown -R www-data:www-data /efs/` again.
1. Get latest code:
  ```
  cd /var/www/html/paradigm
  git pull
  ```
1. `cd /api-new` ... `composer install`
1. `service apache2 restart`
1. `php artisan config:cache`
1. update ENV files on all machines `IMAGE_CACHE=/efs/image_cache/`
