diff --git a/.readme-static/create-a-new-app-in-heroku-1.png b/.readme-static/create-a-new-app-in-heroku-1.png new file mode 100644 index 0000000..d5eb2d6 Binary files /dev/null and b/.readme-static/create-a-new-app-in-heroku-1.png differ diff --git a/.readme-static/create-a-new-app-in-heroku-2.png b/.readme-static/create-a-new-app-in-heroku-2.png new file mode 100644 index 0000000..7cb439d Binary files /dev/null and b/.readme-static/create-a-new-app-in-heroku-2.png differ diff --git a/.readme-static/create-a-new-app-in-heroku-3.png b/.readme-static/create-a-new-app-in-heroku-3.png new file mode 100644 index 0000000..0166353 Binary files /dev/null and b/.readme-static/create-a-new-app-in-heroku-3.png differ diff --git a/.readme-static/create-a-new-app-in-heroku-4.png b/.readme-static/create-a-new-app-in-heroku-4.png new file mode 100644 index 0000000..079a169 Binary files /dev/null and b/.readme-static/create-a-new-app-in-heroku-4.png differ diff --git a/.readme-static/create-a-new-app-in-heroku-5.png b/.readme-static/create-a-new-app-in-heroku-5.png new file mode 100644 index 0000000..4713c37 Binary files /dev/null and b/.readme-static/create-a-new-app-in-heroku-5.png differ diff --git a/.readme-static/create-a-new-app-in-heroku-6.png b/.readme-static/create-a-new-app-in-heroku-6.png new file mode 100644 index 0000000..6033119 Binary files /dev/null and b/.readme-static/create-a-new-app-in-heroku-6.png differ diff --git a/README.md b/README.md index 5fd3599..cb40495 100644 --- a/README.md +++ b/README.md @@ -270,7 +270,91 @@ This documentation can be enabled or disabled from the [configuration](#configur ## 🖥️ Deploy server in heroku (free) -https://signup.heroku.com/ +You can run the bot server in a productive environment on any node server, in this case I will explain the steps to raise the server on the platform [Heroku](https://heroku.com/), which has a free version to deploy node servers, you can also hire a paid service which gives you more features. + +> 💬 If you don't have a Heroku account, you can create one by going to [https://signup.heroku.com/](https://signup.heroku.com/). + +We will need a file called `Procfile`, which is the one Heroku will use to initialize the server once deployed. + +Its content is: +``` +web: npm start +``` + +1. After logging into Heroku, click on Create new app + +
+ +
+ +2. We write the name of our app, and select a region, and then click on Create App. +> 💬 note: Remember to save the name of the app, as you will need it later to replace the value of+ +
+ +3. Heroku gives you several options to deploy your server. You can do it with [Heroku CLI](https://devcenter.heroku.com/articles/heroku-cli) by following the steps in the documentation, or you can deploy it directly from Github, which is much easier. + ++ +
+ +#### Deployment method: Heroku CLI + +Download and install the [Heroku CLI](https://devcenter.heroku.com/articles/heroku-cli). + +If you haven't already, log in to your Heroku account and follow the prompts to create a new SSH public key. + +``` +heroku login +``` + +##### Create a new Git repository +Initialize a git repository in a new or existing directory +``` +cd my-project/ +git init +heroku git:remote -a+ +
+ +Then we select the branch we want to deploy, and click on Deploy Branch, and it will start running the deployment, downloading the code from the repository, installing the dependencies, etc. + ++ +
+ +4. Now we have to configure the environment variables of the server, although we can do it manually from **Settings > Config Vars**, there is a bash script prepared that will raise the environment variables of our `.env` file that is located in the `./variables` folder. +``` +npm run heroku:envs +``` +or +``` +bash heroku-envs.sh +``` ++ +