Skip to content

Installation

Shinebayar G edited this page Nov 27, 2018 · 21 revisions

New: If you want to try out erxes without installing any additional tools on your computer check out our docker images.

All you have to do is docker and docker-compose installed on your computer. Read more here.


This repository is the main web app of the erxes platform that consists of 3 other repositories:

  • Widgets-API - The GraphQL server shared by the erxes apps and widgets.
  • Widgets - Embeddable widget scripts server for erxes
  • API - API for erxes administration app

Installation

Below script will create a directory named erxes.io, clone all of erxes platform repositories and install dependencies. Make sure MongoDB and Redis server are running before running the script.

  curl https://raw.githubusercontent.com/erxes/erxes/master/scripts/install.sh | sh

Following softwares are required to run erxes. If you haven't installed them yet, please go to following installation instructions or check our Prerequisites page.

Configuration

Our application use dotenv to process the configuration.

Copy default settings from .env.sample file and configure it on your own:

cp .env.sample .env

This configuration matches with the default configurations of other erxes platform repositories. For the first time run, you don't need to modify it.

cd erxes-api && yarn initProject - script will create admin account for you.

(username: admin@erxes.io , password: erxes)

Running erxes

This is how the erxes directory should look like similar to this:

I've listed only important files to run erxes at the moment.

erxes
├── ecosystem.json
├── erxes
│   ├── .env
│   ├── node_modules
│   ├── package.json
│   ├── public
│   ├── scripts
│   ├── src
│   ├── stories
├── erxes-api
│   ├── .env
│   ├── node_modules
│   ├── package.json
│   ├── scripts
│   ├── src
├── erxes-widgets
│   ├── client
│   ├── .env
│   ├── node_modules
│   ├── locales
│   ├── package.json
│   ├── scripts
│   ├── server
└── erxes-widgets-api
    ├── .env
    ├── node_modules
    ├── package.json
    ├── scripts
    └── src

Development server

Run yarn dev in erxes-widgets-api, erxes-widgets, erxes-api folders.

Run yarn start in erxes folder.

Production server

Run yarn build in erxes, erxes-api, erxes-widgets, erxes-widgets-api folders to create production optimized build files.

cd erxes.io
PM2 start ecosystem.json
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.