As of December 2018 we’re in the process of moving to deploying everything through ansible. For now we have done the basics for and

Trustroots runs on DigitalOcean (referral link) Ubuntu 14.04 droplet.

This is how to configure production server.


Make sure /etc/nginx/nginx.conf has these:

passenger_root /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini;
# passenger_ruby /usr/bin/passenger_free_ruby;
passenger_nodejs /usr/local/bin/node;
passenger_show_version_in_header off;

Make sure you have configuration file at /etc/nginx/sites-available/trustroots_org.conf and equivalent symlink pointing to it from sites-enabled: ln -s ../sites-available/trustroots_org.conf trustroots_org.conf.

Test configuration by running sudo nginx -t and start/stop/restart nginx by sudo service nginx {start|stop|restart|reload|force-reload|status|configtest|rotate|upgrade}



Configure backups

  1. Install AWS CLI
  2. Make sure you have bucket trustroots-backups at S3 and give user access to that bucket
  3. Create a config file with user’s access keys /srv/configs/aws.conf:
    # Optional, to define default region for this profile.
  4. Add backup scripts for the DB and files by typing sudo crontab -e and add these lines: ```

    Backup DB, once per hour (at x:00)

    0 * * * * /srv/trustroots/scripts/ >/dev/null 2>&1

Sync backup directory to AWS S3, once per hour (at x:10)

10 * * * * /srv/trustroots/scripts/ >/dev/null 2>&1

If your deployment runs DB migration scripts, create a backup prior to that by running `sudo bash /srv/trustroots/scripts/`

#### Updating AWS client ([via](
- As in; it's not installed via python pip
- Test you have the latest; `aws --version`
- Update:

wget unzip sudo ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws ```




People with rights to access the server, databases and statistics

Kasper, Mikael. Abel.