- Deployment is the logical phase after developing an application. This section will deal with the production deployment of the application. - In the first time, you should to install all dependencies. -
- -All you have to do is install the dependencies with the following commands
-or
-In the second time, you should to build your application because the production mode cannot read and execute the typescript natively.
-or
-PM2 is a daemon process manager that will help you manage and keep your application online 24/7. Install PM2 :
-or
-Create a root file named ecosystem.config.js.
Then open a terminal in the root folder of your application and run the following command :
-Docker is free software for launching applications in isolated containers.
-Learn more:
-Create a root file named Dockerfile.
Then open a terminal in the root folder of your application and run the following command :
-Use docker-compose to automate the start command of your bot with the following content :
-Finally, you can run your image inside a container with the following command :
-To stop the container, run the following command :
-To stop see the log of your discord bot, run the following command :
-