💌 A beautiful, fast and fully open source mail client for Mac, Windows and Linux.
Go to file
2016-07-15 10:23:01 -07:00
packages Do contact insertion in a transaction 2016-07-15 10:23:01 -07:00
.dockerignore Dockerfile successfully building ping endpoint 2016-07-07 12:10:01 -07:00
.env Commit .env to fix dev environment 2016-06-27 13:29:13 -07:00
.eslintrc Adds bunyan for json logging on every package! 2016-07-08 17:30:24 -07:00
.gitignore Add file watching to restart server 2016-07-11 12:00:20 -07:00
Dockerfile Update dockerfile to start with env variable 2016-07-07 16:32:46 -07:00
lerna.json Upgrade lerna 2016-07-06 13:51:17 -07:00
package.json Use EC2 instance ID instead of hostname 2016-07-14 18:52:30 -07:00
pm2-dev.yml A few changes for upcoming db refactoring 2016-07-14 15:48:48 -07:00
pm2-prod-api.yml Add dashboard pm2 config 2016-07-07 17:07:19 -07:00
pm2-prod-dashboard.yml Add dashboard pm2 config 2016-07-07 17:07:19 -07:00
pm2-prod-sync.yml Switch to PM2 for dev + prod 2016-07-07 15:25:45 -07:00
README.md Add Linux setup instructions to README.md 2016-07-11 18:36:08 -07:00
test_accounts.txt Copy test_accounts.py into curl format for easy testing 2016-07-12 01:34:13 -07:00

K2 - Sync Engine Experiment

Initial Setup:

New Computer (Mac):

  1. Install Homebrew
  2. Install VirtualBox 5+
  3. Install Docker for Mac
  4. Install NVM brew install nvm
  5. Install Node 6+ via NVM: nvm install 6
  6. Install Redis locally brew install redis

New Computer (Linux - Debian/Ubuntu):

  1. Install Node 6+ via NodeSource (trusted):
  2. curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
  3. sudo apt-get install -y nodejs
  4. Install Redis locally sudo apt-get install -y redis-server redis-tools

New to AWS:

  1. Install Elastic Beanstalk CLI: sudo pip install awsebcli
  2. On Linux, you may need to install Python 3's pip via sudo apt-get install python3-pip and then run pip3 install --user awsebcli. This installs to your home directory and you need to have ~/.local/bin in your $PATH.
  3. Install AWS CLI: brew install awscli on Mac and pip install --user awscli on Linux.
  4. Add your AWS IAM Security Credentials to aws configure.
  5. These are at Console Home -> IAM -> Users -> {{Your Name}} -> Security Credentials. Note that your private key was only shown unpon creation. If you've lost your private key you have to deactivate your old key and create a new one.
  6. Get the K2 team private SSH key. (Ignore this when we have a Bastion Host). Ask someone on K2 for a copy of the private SSH key. Copy it to your ~/.ssh folder.
  7. chmod 400 ~/.ssh/k2-keypair.pem
  8. ssh i ~/.ssh/k2-keypair.pem some-ec2-box-we-own.amazonaws.com
  9. Connect to Elastic Beanstalk instances: eb init. Select correct region. Select correct application.

Developing Locally:

npm run start
npm run logs
npm run stop

We use pm2 to launch a variety of processes (sync, api, dashboard, processor, etc).

You can see the scripts that are running and their arguments in /pm2-dev.yml

To test to see if the basic API is up go to: http://lvh.me:5100/ping. You should see pong.

lvh.me is a DNS hack that redirects back to 127.0.0.1 with the added benefit of letting us use subdomains.

Deploying