From e6803a25e5794c4e6cd125c64a921b938cf9c4b4 Mon Sep 17 00:00:00 2001 From: Batnasan Byambasuren Date: Tue, 7 Jan 2020 15:58:38 +1100 Subject: [PATCH 1/4] remove erxes widgets api --- docs/installation/heroku.md | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/docs/installation/heroku.md b/docs/installation/heroku.md index 7db8b69..228eff3 100644 --- a/docs/installation/heroku.md +++ b/docs/installation/heroku.md @@ -34,10 +34,9 @@ Please try clicking the deploy button below, then set all the config vars and hi REACT_APP_API_SUBSCRIPTION_URL = ws://erxes-api.herokuapp.com/subscriptions REACT_APP_API_URL = https://erxes-api.herokuapp.com REACT_APP_CDN_HOST = https://erxes-widget.herokuapp.com -REACT_APP_CDN_HOST_API = https://erxes-widget-api.herokuapp.com ``` -[![Deploy erxes](https://www.herokucdn.com/deploy/button.svg#heroku "Deploy erxes")](https://heroku.com/deploy?template=https://github.com/erxes/erxes) +[![Deploy erxes](https://www.herokucdn.com/deploy/button.svg#heroku "Deploy erxes")](https://heroku.com/deploy?template=https://github.com/batnasan/erxes/tree/master) 2.**Install erxes API** @@ -75,11 +74,10 @@ REDIS_PORT = 28229 # update it later on UPLOAD_FILE_TYPES = image/png,image/jpeg,image/jpg,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/pdf, UPLOAD_SERVICE_TYPE = AWS USE_BRAND_RESTRICTIONS = false -WIDGETS_API_DOMAIN = https://erxes-widget-api.herokuapp.com WIDGETS_DOMAIN = https://erxes-widget.herokuapp.com ``` -[![Deploy erxes API](https://www.herokucdn.com/deploy/button.svg#heroku "Deploy erxes API")](https://heroku.com/deploy?template=https://github.com/erxes/erxes-api) +[![Deploy erxes API](https://www.herokucdn.com/deploy/button.svg#heroku "Deploy erxes API")](https://heroku.com/deploy?template=https://github.com/batnasan/erxes-api/tree/master) 3.**Install erxes Widgets** @@ -88,29 +86,13 @@ Now install erxes Widget app by clicking the deploy button below and set config **Config vars:** ```sh -API_GRAPHQL_URL = https://erxes-widget-api.herokuapp.com/graphql API_SUBSCRIPTIONS_URL = ws://erxes-api.herokuapp.com/subscriptions MAIN_API_URL = https://erxes.herokuapp.com PORT = 3200 ROOT_URL = https://erxes-widget.herokuapp.com ``` -[![Deploy Widgets](https://www.herokucdn.com/deploy/button.svg#heroku "Deploy erxes Widgets")](https://heroku.com/deploy?template=https://github.com/erxes/erxes-widgets) - -4.**Install erxes Widgets API** - -You are doing great! And now it's time to install last app - erxes Widgets API. - -**Config vars:** - -```sh -MONGO_URL = mongodb://localhost/erxes -PORT = 3100 -RABBITMQ_HOST = amqp://localhost # we will update it later on -WIDGET_URL = https://erxes-widget.herokuapp.com # we will update it later on -``` - -[![Deploy Widgets API](https://www.herokucdn.com/deploy/button.svg#heroku "Deploy erxes Widgets API")](https://heroku.com/deploy?template=https://github.com/erxes/erxes-widgets-api) +[![Deploy Widgets](https://www.herokucdn.com/deploy/button.svg#heroku "Deploy erxes Widgets")](https://heroku.com/deploy?template=https://github.com/batnasasn/erxes-widgets/tree/master) Now go to Heroku dashboard and select the **erxes-api app** from the Apps tab. From 1190a49aa6f3206f8014adb1c4848483a5b321cb Mon Sep 17 00:00:00 2001 From: Batnasan Byambasuren Date: Wed, 8 Jan 2020 16:44:24 +1100 Subject: [PATCH 2/4] update heroku doc --- docs/installation/heroku.md | 69 +++++++++++++++---------------------- 1 file changed, 27 insertions(+), 42 deletions(-) diff --git a/docs/installation/heroku.md b/docs/installation/heroku.md index 228eff3..0f80692 100644 --- a/docs/installation/heroku.md +++ b/docs/installation/heroku.md @@ -22,7 +22,7 @@ In this installation guide, we pretend the following app names will be available Try the following 4 steps to install all required apps on Heroku. -**Note** - When setting up config vars (environment vars), do not change the PORT numbers of all apps. +**Note**: When setting up config vars (environment vars), do not change the PORT numbers of all apps. 1.**Install erxes** @@ -36,7 +36,7 @@ REACT_APP_API_URL = https://erxes-api.herokuapp.com REACT_APP_CDN_HOST = https://erxes-widget.herokuapp.com ``` -[![Deploy erxes](https://www.herokucdn.com/deploy/button.svg#heroku "Deploy erxes")](https://heroku.com/deploy?template=https://github.com/batnasan/erxes/tree/master) +[![Deploy erxes](https://www.herokucdn.com/deploy/button.svg#heroku "Deploy erxes")](https://heroku.com/deploy?template=https://github.com/batnasan/erxes/tree/heroku_button) 2.**Install erxes API** @@ -45,39 +45,19 @@ Now it's time to install erxes API - click the button below and set the config v **Config vars:** ```sh -AWS_ACCESS_KEY_ID = your_acess_key_id -AWS_BUCKET = bucket_name -AWS_PREFIX = prefix -AWS_REGION = your_bucket_region -AWS_SECRET_ACCESS_KEY = secret_key -AWS_SES_ACCESS_KEY_ID = access_key -AWS_SES_CONFIG_SET = config -AWS_SES_SECRET_ACCESS_KEY = secret_key -COMPANY_EMAIL_FROM = noreply@erxes.io -DEFAULT_EMAIL_SERVICE = sendgrid DOMAIN = https://erxes-api.herokuapp.com -FILE_SYSTEM_PUBLIC = false -HTTPS = true INTEGRATIONS_API_DOMAIN = https://ERXESINTEGRATIONSAPINAME.herokuapp.com -MAIL_HOST = your_mail_host -MAIL_PASS = pass -MAIL_PORT = port -MAIL_SERVICE = sendgrid -MAIL_USER = your_user MAIN_APP_DOMAIN = https://erxes.herokuapp.com MONGO_URL = mongodb:// # leave it as is, we will update it later on PORT = 3300 -PUBSUB_TYPE = REDIS +RABBITMQ_HOST = RABBITMQ_HOST REDIS_HOST = REDIS_HOST # we will update it later on REDIS_PASSWORD = REDIS_PASS # we will update it later on REDIS_PORT = 28229 # update it later on -UPLOAD_FILE_TYPES = image/png,image/jpeg,image/jpg,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/pdf, -UPLOAD_SERVICE_TYPE = AWS -USE_BRAND_RESTRICTIONS = false WIDGETS_DOMAIN = https://erxes-widget.herokuapp.com ``` -[![Deploy erxes API](https://www.herokucdn.com/deploy/button.svg#heroku "Deploy erxes API")](https://heroku.com/deploy?template=https://github.com/batnasan/erxes-api/tree/master) +[![Deploy erxes API](https://www.herokucdn.com/deploy/button.svg#heroku "Deploy erxes API")](https://heroku.com/deploy?template=https://github.com/batnasan/erxes-api/tree/heroku_button) 3.**Install erxes Widgets** @@ -92,36 +72,41 @@ PORT = 3200 ROOT_URL = https://erxes-widget.herokuapp.com ``` -[![Deploy Widgets](https://www.herokucdn.com/deploy/button.svg#heroku "Deploy erxes Widgets")](https://heroku.com/deploy?template=https://github.com/batnasasn/erxes-widgets/tree/master) +[![Deploy Widgets](https://www.herokucdn.com/deploy/button.svg#heroku "Deploy erxes Widgets")](https://heroku.com/deploy?template=https://github.com/batnasan/erxes-widgets/tree/heroku_button) Now go to Heroku dashboard and select the **erxes-api app** from the Apps tab. -Go to Resources tab where you can manage your resources. You need to share MongoDB and RabbitMQ addons with **erxes-widget-api** app so that the **erxes-widget-api** will be able to access these two addons. +Go to Settings tab where you can manage your Config Vars as you need to update config vars of **erxes-api** app. -To do that, click a button 'Attached as RABBITMQ' in Add-ons section and then click 'Manage Attachments'. -Now click '+ Attach to another app' button and search for 'erxes widget app' name you have chosen and select it. -Repeat the step for MongoDB. +In the Config Vars section, click a button 'Reveal Config Vars' so that you will be able to see all the config vars. -If you find it difficult, please go to [Heroku Dev Center](https://devcenter.heroku.com/articles/managing-add-ons#using-the-dashboard-attaching-an-add-on-to-another-app). +Copy MONGO_URI's value and paste it into MONGO_URL. -Finally, you need to update config vars of **erxes-api** and **erxes-widget-api** apps. +Copy RABBITMQ_URL's value and paste into RABBITMQ_HOST. -Please go to **erxes-api** app and select Settings tab. -In the Config Vars section, click a button 'Reveal Config Vars'. -Now you will be able to see all the config vars. -Copy MONGO_URI's value and paste it into MONGO_URL. -Copy RABBITMQ_URL's value and paste into RABBITMQ_HOST. Update REDIS_HOST, REDIS_PASSWORD, and REDIS_PORT values using REDIS_URL's value. -Now please go to **erxes-widget-api** and update RABBITMQ_HOST and MONGO_URL config vars. -Use CLOUDAMQP_URL and MONGODB_URI config vars values'. - -Now go back to **erxes-api** and click 'More' button in the top right corner, then select 'Run console'. -Run 'yarn initProject' command which will create the following credentials for you to log into `https://erxes.herokuapp.com`. +Now click 'More' button in the top right corner, then select 'Run console'. +Run `yarn initProject` command which will create the following credentials for you to log into `https://erxes.herokuapp.com`. ```sh username: admin@erxes.io password: erxes ``` -Now it's time to grab yourself a cup of coffee and enjoy using **Erxes**. +Please now go to Resources tab as you will need to start `cronjob` and `worker` processes. +Start `cronjob` and `worker`. + +Last step is to insert initial data. To do that you will need to clone `erxes-api` repo and `mongorestore` tool. + +Clone the `erxes-api` and run the following commands in the terminal. + +`cd erxes-api` + +`mongorestore --host=host --port=port -u user -d db initialData` + +`mongorestore --host=host --port=port -u user -d db permissionData` + +**Note**: extract `host`, `port`, `user`, `db` from the `MONGO_URI` config var. + +Now it's time to grab yourself a cup of coffee and enjoy using **erxes**. From 7f8cf034caf190514ac7a85c0967175be10dc13d Mon Sep 17 00:00:00 2001 From: Batnasan Byambasuren Date: Wed, 8 Jan 2020 21:27:04 +1100 Subject: [PATCH 3/4] update heroku deployment --- docs/installation/heroku.md | 82 ++++++++++++++++++++++++++++++++++--- 1 file changed, 77 insertions(+), 5 deletions(-) diff --git a/docs/installation/heroku.md b/docs/installation/heroku.md index 0f80692..2cb8154 100644 --- a/docs/installation/heroku.md +++ b/docs/installation/heroku.md @@ -11,20 +11,19 @@ In order to deploy erxes and other related apps, you will need `mLab MongoDB` (M To add any addon to an app, you will need to register your credit card. So please add your creadit card and verify your account prior to proceeding further. -### One Click deployment +## One Click deployment In this installation guide, we pretend the following app names will be available on Heroku and they will be used to demonstrate - we expect you to choose any available names on Heroku. - `erxes` - **erxes** `(https://erxes.herokuapp.com)` - `erxes API` - **erxes-api** `(https://erxes-api.herokuapp.com)` - `erxes Widget` - **erxes-widget** `(https://erxes-widget.herokuapp.com)` -- `erxes Widget API` - **erxes-widget-api** `(https://erxes-widget-api.herokuapp.com)` Try the following 4 steps to install all required apps on Heroku. **Note**: When setting up config vars (environment vars), do not change the PORT numbers of all apps. -1.**Install erxes** +### 1. Install erxes Please try clicking the deploy button below, then set all the config vars and hit the Deploy app button. @@ -38,7 +37,7 @@ REACT_APP_CDN_HOST = https://erxes-widget.herokuapp.com [![Deploy erxes](https://www.herokucdn.com/deploy/button.svg#heroku "Deploy erxes")](https://heroku.com/deploy?template=https://github.com/batnasan/erxes/tree/heroku_button) -2.**Install erxes API** +### 2. Install erxes API Now it's time to install erxes API - click the button below and set the config vars. @@ -59,7 +58,7 @@ WIDGETS_DOMAIN = https://erxes-widget.herokuapp.com [![Deploy erxes API](https://www.herokucdn.com/deploy/button.svg#heroku "Deploy erxes API")](https://heroku.com/deploy?template=https://github.com/batnasan/erxes-api/tree/heroku_button) -3.**Install erxes Widgets** +### 3. Install erxes Widgets Now install erxes Widget app by clicking the deploy button below and set config vars. @@ -110,3 +109,76 @@ Clone the `erxes-api` and run the following commands in the terminal. **Note**: extract `host`, `port`, `user`, `db` from the `MONGO_URI` config var. Now it's time to grab yourself a cup of coffee and enjoy using **erxes**. + +## Extra features + +There is a several apps available for you to install and add extra features to erxes. +The steps of installing them are same as above. + +### 1. Install erxes engages email sender + +**Config vars:** + +```sh +AWS_SES_CONFIG_SET = erxes +MAIN_API_URL = https://erxes-api.herokuapp.com +MONGO_URL = MONGO_URL # we will update it later on +PORT = 3900 +RABBITMQ_HOST = copy and paste from erxes-api RABBITMQ_HOST config var +``` + +[![Deploy Widgets](https://www.herokucdn.com/deploy/button.svg#heroku "Deploy erxes engages email sender")](https://heroku.com/deploy?template=https://github.com/batnasan/erxes-engages-email-sender/tree/heroku_button) + +Once the app is deployed, go to `Settings` and click `Config Vars` button. +Copy `MONGODB_URI`'s value and paste it into `MONGO_URL`. + +### 2. Install erxes logger + +**Config vars:** + +```sh +DEBUG_PREFIX = erxes-logs +MONGO_URL = MONGO_URL # we will update it later on +PORT = 3800 +``` + +[![Deploy Widgets](https://www.herokucdn.com/deploy/button.svg#heroku "Deploy erxes engages email sender")](https://heroku.com/deploy?template=https://github.com/batnasan/erxes-logger/tree/heroku_button) + +Once the app is deployed, go to `Settings` and click `Config Vars` button. +Copy `MONGODB_URI`'s value and paste it into `MONGO_URL`. + +### 3. Install erxes integrations + +**Config vars:** + +```sh +DOMAIN = https://erxes-integration.herokuapp.com +ENCRYPTION_KEY = ENCRYPTION_KEY +FACEBOOK_APP_ID = FACEBOOK_APP_ID +FACEBOOK_APP_SECRET = FACEBOOK_APP_SECRET +FACEBOOK_VERIFY_TOKEN = FACEBOOK_VERIFY_TOKEN +GOOGLE_APPLICATION_CREDENTIALS = GOOGLE_APPLICATION_CREDENTIALS +GOOGLE_CLIENT_ID = GOOGLE_CLIENT_ID +GOOGLE_GMAIL_SUBSCRIPTION_NAME = GOOGLE_GMAIL_SUBSCRIPTION_NAME +GOOGLE_GMAIL_TOPIC = GOOGLE_GMAIL_TOPIC +GOOGLE_PROJECT_ID = GOOGLE_PROJECT_ID +MAIN_API_DOMAIN = MAIN_API_DOMAIN +MAIN_APP_DOMAIN = MAIN_APP_DOMAIN +MICROSOFT_CLIENT_ID = MICROSOFT_CLIENT_ID +MICROSOFT_CLIENT_SECRET = MICROSOFT_CLIENT_SECRET +MONGO_URL = MONGO_URL # we will update it later on +NYLAS_CLIENT_ID = NYLAS_CLIENT_ID +NYLAS_CLIENT_SECRET = NYLAS_CLIENT_SECRET +NYLAS_WEBHOOK_CALLBACK_URL = NYLAS_WEBHOOK_CALLBACK_URL +PORT = 3400 +RABBITMQ_HOST = copy and paste from erxes-api RABBITMQ_HOST config var +TWITTER_ACCESS_TOKEN = TWITTER_ACCESS_TOKEN +TWITTER_ACCESS_TOKEN_SECRET = TWITTER_ACCESS_TOKEN_SECRET +TWITTER_CONSUMER_KEY = TWITTER_CONSUMER_KEY +TWITTER_CONSUMER_SECRET = TWITTER_CONSUMER_SECRET +``` + +[![Deploy Widgets](https://www.herokucdn.com/deploy/button.svg#heroku "Deploy erxes engages email sender")](https://heroku.com/deploy?template=https://github.com/batnasan/erxes-integrations/tree/heroku_button) + +Once the app is deployed, go to `Settings` and click `Config Vars` button. +Copy `MONGODB_URI`'s value and paste it into `MONGO_URL`. From 92dd9f544874883c4fb8726009f3782dc51db448 Mon Sep 17 00:00:00 2001 From: Batnasan Byambasuren Date: Mon, 27 Jan 2020 22:59:59 +1100 Subject: [PATCH 4/4] update heroku doc --- docs/installation/heroku.md | 49 ++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 25 deletions(-) diff --git a/docs/installation/heroku.md b/docs/installation/heroku.md index 2cb8154..fd471d7 100644 --- a/docs/installation/heroku.md +++ b/docs/installation/heroku.md @@ -58,21 +58,6 @@ WIDGETS_DOMAIN = https://erxes-widget.herokuapp.com [![Deploy erxes API](https://www.herokucdn.com/deploy/button.svg#heroku "Deploy erxes API")](https://heroku.com/deploy?template=https://github.com/batnasan/erxes-api/tree/heroku_button) -### 3. Install erxes Widgets - -Now install erxes Widget app by clicking the deploy button below and set config vars. - -**Config vars:** - -```sh -API_SUBSCRIPTIONS_URL = ws://erxes-api.herokuapp.com/subscriptions -MAIN_API_URL = https://erxes.herokuapp.com -PORT = 3200 -ROOT_URL = https://erxes-widget.herokuapp.com -``` - -[![Deploy Widgets](https://www.herokucdn.com/deploy/button.svg#heroku "Deploy erxes Widgets")](https://heroku.com/deploy?template=https://github.com/batnasan/erxes-widgets/tree/heroku_button) - Now go to Heroku dashboard and select the **erxes-api app** from the Apps tab. Go to Settings tab where you can manage your Config Vars as you need to update config vars of **erxes-api** app. @@ -85,18 +70,10 @@ Copy RABBITMQ_URL's value and paste into RABBITMQ_HOST. Update REDIS_HOST, REDIS_PASSWORD, and REDIS_PORT values using REDIS_URL's value. -Now click 'More' button in the top right corner, then select 'Run console'. -Run `yarn initProject` command which will create the following credentials for you to log into `https://erxes.herokuapp.com`. - -```sh -username: admin@erxes.io -password: erxes -``` - Please now go to Resources tab as you will need to start `cronjob` and `worker` processes. Start `cronjob` and `worker`. -Last step is to insert initial data. To do that you will need to clone `erxes-api` repo and `mongorestore` tool. +The last step is to insert initial data. To do that you will need to clone `erxes-api` repo and `mongorestore` tool. Clone the `erxes-api` and run the following commands in the terminal. @@ -108,11 +85,33 @@ Clone the `erxes-api` and run the following commands in the terminal. **Note**: extract `host`, `port`, `user`, `db` from the `MONGO_URI` config var. +Now you can log into `https://erxes.herokuapp.com` using the following credentials. + +```sh +username: admin@erxes.io +password: erxes +``` + +### 3. Install erxes Widgets + +Now install erxes Widget app by clicking the deploy button below and set config vars. + +**Config vars:** + +```sh +API_SUBSCRIPTIONS_URL = ws://erxes-api.herokuapp.com/subscriptions +MAIN_API_URL = https://erxes.herokuapp.com +PORT = 3200 +ROOT_URL = https://erxes-widget.herokuapp.com +``` + +[![Deploy Widgets](https://www.herokucdn.com/deploy/button.svg#heroku "Deploy erxes Widgets")](https://heroku.com/deploy?template=https://github.com/batnasan/erxes-widgets-heroku-button) + Now it's time to grab yourself a cup of coffee and enjoy using **erxes**. ## Extra features -There is a several apps available for you to install and add extra features to erxes. +There is a several apps available for you to install and make erxes even more powerful. The steps of installing them are same as above. ### 1. Install erxes engages email sender