From 7f86c936add27e9a1f1054aa442e97d0ba105de2 Mon Sep 17 00:00:00 2001 From: gaba Date: Wed, 21 Dec 2016 13:17:04 -0800 Subject: [PATCH 1/4] Adds a very simple INSTALL file for devs. --- INSTALL.md | 85 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 INSTALL.md diff --git a/INSTALL.md b/INSTALL.md new file mode 100644 index 000000000..b5af7529d --- /dev/null +++ b/INSTALL.md @@ -0,0 +1,85 @@ +# BUILDING FROM SOURCE + +By contributing to this project you agree to the [Code of Conduct](https://coralproject.net/code-of-conduct.html). + +## Requirements + +* [Node 7.2.1](https://nodejs.org/es/download/package-manager) +* Mongo 3.4.0 +* Redis 3.2.6 + +### Operating System + +- We recommend hosting [Talk](https://github.com/coralproject/talk) with any flavor of Linux +- 1GB memory (minimum) +- 5GB storage (minimum) + +## Initial Setup + +### Get the code + +Clone the repository: + +` +git clone https://github.com/coralproject/talk +` + +### Installation + +* cd talk +* npm install +* npm run build + +### Environmental Variables + + export TALK_PORT=5000 + export TALK_MONGO_URL=mongodb://localhost/talk + export TALK_REDIS_URL=redis://redis/talk + export TALK_SESSION_SECRET=somethingsecret + export TALK_FACEBOOK_APP_ID=fbidapp_youneeditforfbconnect + export TALK_FACEBOOK_APP_SECRET=fbappsecret_youneeditforfbconnect + export TALK_ROOT_URL=http://localhost:5000 + export TALK_SMTP_USERNAME=coralproject + export TALK_SMTP_PASSWORD=smtppassword + export TALK_SMTP_HOST=smtp.example.net + export TALK_SMTP_PROVIDER=Example + +### Local development + +` +npm start +` + +It will run in http://localhost:5000 + + +### Testing + +Run all tests once via: + +` +npm test +` + +` +npm run e2e +` + +## Recommendations for Deployment + +##### Web Server + +* [Caddy](https://caddyserver.com/) + +##### SSL Certificates + +* [Let's Encrypt](https://letsencrypt.org/) + + +## Troubleshooting + + +##### Can't ping the redis server! + +- Check that Redis Server is running. +- Check that TALK_REDIS_URL is set. From 54bad908b3fa587fd206b4f0f06fe24b9099c985 Mon Sep 17 00:00:00 2001 From: gaba Date: Wed, 21 Dec 2016 16:01:16 -0800 Subject: [PATCH 2/4] Apply changes from review. --- INSTALL.md | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index b5af7529d..c9a56b96c 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -4,10 +4,10 @@ By contributing to this project you agree to the [Code of Conduct](https://coral ## Requirements -* [Node 7.2.1](https://nodejs.org/es/download/package-manager) -* Mongo 3.4.0 -* Redis 3.2.6 - +* [Node](https://nodejs.org/es/download/package-manager) +* Mongo +* Redis +* ### Operating System - We recommend hosting [Talk](https://github.com/coralproject/talk) with any flavor of Linux @@ -28,7 +28,6 @@ git clone https://github.com/coralproject/talk * cd talk * npm install -* npm run build ### Environmental Variables @@ -50,7 +49,7 @@ git clone https://github.com/coralproject/talk npm start ` -It will run in http://localhost:5000 +It will run in http://localhost:$PORT ### Testing @@ -65,17 +64,6 @@ npm test npm run e2e ` -## Recommendations for Deployment - -##### Web Server - -* [Caddy](https://caddyserver.com/) - -##### SSL Certificates - -* [Let's Encrypt](https://letsencrypt.org/) - - ## Troubleshooting From 39222759f9695f2f9f27a342b9f166e13678e1ec Mon Sep 17 00:00:00 2001 From: gaba Date: Thu, 22 Dec 2016 08:31:00 -0800 Subject: [PATCH 3/4] Adds links between README and INSTALL. --- INSTALL.md | 14 ++------------ README.md | 5 +++++ 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index c9a56b96c..623e48ffc 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -7,7 +7,7 @@ By contributing to this project you agree to the [Code of Conduct](https://coral * [Node](https://nodejs.org/es/download/package-manager) * Mongo * Redis -* + ### Operating System - We recommend hosting [Talk](https://github.com/coralproject/talk) with any flavor of Linux @@ -31,17 +31,7 @@ git clone https://github.com/coralproject/talk ### Environmental Variables - export TALK_PORT=5000 - export TALK_MONGO_URL=mongodb://localhost/talk - export TALK_REDIS_URL=redis://redis/talk - export TALK_SESSION_SECRET=somethingsecret - export TALK_FACEBOOK_APP_ID=fbidapp_youneeditforfbconnect - export TALK_FACEBOOK_APP_SECRET=fbappsecret_youneeditforfbconnect - export TALK_ROOT_URL=http://localhost:5000 - export TALK_SMTP_USERNAME=coralproject - export TALK_SMTP_PASSWORD=smtppassword - export TALK_SMTP_HOST=smtp.example.net - export TALK_SMTP_PROVIDER=Example +This project is using many environmental variables for configuration. You can learn about them in the [README's file](README.md). ### Local development diff --git a/README.md b/README.md index 3b258736f..48aca3a90 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,11 @@ available in the format: `://` without the path. - `TALK_SMTP_HOST` (*required*) - SMTP host url with format `smtp.domain.com`. - `TALK_SMTP_PORT` (*required*) - SMTP port. + +### Install from Source + +If you want to run Talk in development mode from source (without docker) you can read the [INSTALL file](INSTALL.md). + ### License Copyright 2016 Mozilla Foundation From da37bb32f138a53bef882378c392ba23a1877e9a Mon Sep 17 00:00:00 2001 From: David Erwin Date: Tue, 27 Dec 2016 11:28:01 -0500 Subject: [PATCH 4/4] Updating for style and completeness --- INSTALL.md | 74 ++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 53 insertions(+), 21 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 623e48ffc..faee7bb25 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -1,59 +1,85 @@ -# BUILDING FROM SOURCE +# Installing a dev environment By contributing to this project you agree to the [Code of Conduct](https://coralproject.net/code-of-conduct.html). ## Requirements -* [Node](https://nodejs.org/es/download/package-manager) -* Mongo -* Redis +### System -### Operating System - -- We recommend hosting [Talk](https://github.com/coralproject/talk) with any flavor of Linux +- Any flavor of Linux, OSX or Windows - 1GB memory (minimum) - 5GB storage (minimum) -## Initial Setup +### Software -### Get the code +* [Node](https://nodejs.org/es/download/package-manager) v7 or later +* Mongo v3.2 or later +* Redis v3.2 or later -Clone the repository: +_Please be sure to check the versions of these requirements. Insufficient versions of these may lead to unexpected errors!_ -` -git clone https://github.com/coralproject/talk -` +## First time setup ### Installation -* cd talk -* npm install +Navigate to a directory. + +``` +git clone https://github.com/coralproject/talk +cd talk +npm install +``` ### Environmental Variables -This project is using many environmental variables for configuration. You can learn about them in the [README's file](README.md). +Talk uses environmental variables for configuration. You can learn about them in the [README file](README.md). -### Local development -` +## Workflows + +### The server + +Starting the server: + +``` npm start -` +``` -It will run in http://localhost:$PORT +Browse to `http://localhost:3000` (or your custom port.) + +### Building the front end + +Our build process will build all front end components registered [here](https://github.com/coralproject/talk/blob/6052cac1d3494f8060325a88bb2ce03c88c2f94c/webpack.config.dev.js#L9-L15). + +One time build: + +``` +npm build +``` + +Build, then rebuild when a file is updated (development build): + +``` +npm build-watch +``` ### Testing -Run all tests once via: +Run all tests once: ` npm test ` +Run our end to end tests (will install Selenium and nightwatch): + ` npm run e2e ` +_Please ensure all tests are passing before submitting a PR!_ + ## Troubleshooting @@ -61,3 +87,9 @@ npm run e2e - Check that Redis Server is running. - Check that TALK_REDIS_URL is set. + +##### Authenticaiton doesn't work! + +- Make sure Redis is the correct version. + +