/iza-mvp

Primary LanguageJavaScriptMIT LicenseMIT

PRs Welcome

IZA [MVP]

Installation

IZA is built to run on Docker. However you can run it locally as long as you have NodeJS as well as npm or yarn (preferred!) in your system.

Development

To install and run in your computer just run the following commands in your terminal. You'll need to have Docker installed (See below for instructions without docker):

  1. Clone this repo: git clone https://github.com/pabloassisborges/iza-mvp.git
  2. Navigate into directory: cd iza-mvp
  3. Install dependencies: docker-compose run --rm alpha yarn install
  4. Then you can lift the server: docker-compose up alpha

That's it! you should see the demo bot up and running in your browser if you open localhost:3000* in your browser.

A couple of important points when running on development mode:

  • The bot app will have Hot Reloading enabled, so that you can experience the benefits of Webpack + React.
  • Redux DevTools are enabled by default so that you can inspect the app's actions/state chages in real time.
  • The time between each bot message is set to 0. This is to minimize developers' frustration when they go over the conversation flow again and again, however you can change this behavior if you wish at app/containers/BotContainer/sagas.js.

Production

  • Heroku: Just run git push heroku master. This bot is Heroku-ready!

  • Local with Docker: If you can to compile the image to see how it will behave on production, we put a build together as well. Just run:

  docker-compose up release

It will build the image and lift the production server.

Without Docker

If you wish to install and run without Docker you'll have to install all the dependencies directly in your directory:

For Development:

  1. Clone this repo: git clone https://github.com/pabloassisborges/iza-mvp.git
  2. Navigate into directory: cd iza-mvp
  3. Run either npm install or yarn install to install the dependencies
  4. Run npm start to fire up the server
  5. Visit localhost:3000 in your browser

For Production:

  • This repo is Heroku ready, just do git push heroku master
  • If for some reason you alter your package.json's scripts, be sure to consider these steps before deploying to a production server.
  • For AWS you can follow the same steps listed here
  • For Azure/Softlayer/other servers you'll have to ssh to the server, pull the repo, install the dependencies using yarn and then do npm run build in order to create the ./build folder. Finally you can start the server using start:prod. Alternatively just run start:production and it'll run these steps together in sequence, plus tests.