🚀Deploy

Prerequisites

Setup

Installation

Virtual Environment

Create the virtual environment using the following command:

make create_python_venv

To run the virtual environment, you can use the following command:

source venv/bin/activate

Dependencies

To install the dependencies, you can use the following command:

make deps

Database Setup

Create Database Container

This Bot uses a Postgres database. You can either install Postgres locally or use Docker (recommended for development environment).

If you use Docker, you can use the following command to start a Postgres container:

make create_db container=<container> user=<user> password=<pwd> database=<db_name>

This container will have a database called <db_name>, by default it is mm-bot-db.

Run Database Container

If you want to run or re-run the database container, you can use the following command:

make start_db container=<container>

Stop Database Container

If you want to stop the database container, you can use the following command:

make stop_db container=<container>

Environment Variables

This API uses environment variables to configure the application. You can create a .env file in the root of the project to set the environment variables.

To create your own .env file run the following command:

make create_env

The following table describes each environment variable:

There is an example file called .env.example in the root of the project.

Database Population

To create the tables, you can use the following command:

TODO

You must run schema.sql into the database to create the tables. You can use pgAdmin or any other tool to run the script.

Development

To start the Bot, you can use the following command:

make run

Test [TODO]

To run the tests, you can use the following command:

Last updated