···4455---
6677-[](https://app.travis-ci.com/Dekalabs/kefi-backend)
77+# Welcome to Kefi community!
88+99+## Run in local
1010+1111+To be able to run Kefi in you own computer, for development proposes, first, you'll
1212+need the following software installed and configured:
1313+1414+* Python 3.10 (we recommend [pyenv](https://github.com/pyenv/pyenv) to handle several Python versions)
1515+* [poetry](https://python-poetry.org/)
1616+* [Docker](https://www.docker.com/) and docker-compose
1717+1818+This project uses environment variables to handle the configuration, following the [twelve-factor config recommendation](https://12factor.net/config), and we recommend to use [direnv](https://direnv.net/) to handle project's local environment variables.
1919+2020+### 1. Clone the repository
2121+2222+First, just clone this repository in your machine.
2323+2424+### 2. Create environment variables
2525+2626+Assuming you are using [direnv](https://direnv.net/), on the root of the project, creates a file named `.envrc`:
2727+2828+ $ echo "dotenv" > .envrc
2929+3030+Then create an `.env` file with the environment variables. An example:
3131+3232+ # PostgreSQL
3333+ # ------------------------------------------------------------------------------
3434+ POSTGRES_HOST=localhost
3535+ POSTGRES_PORT=5432
3636+ POSTGRES_DB=kefi
3737+ POSTGRES_USER=pyqF6iHnFi3LjiFV
3838+ POSTGRES_PASSWORD=HGt9nkXNv6F9xkzN
83999-# Welcome to Kefi community!4040+ # Database connection
4141+ # ------------------------------------------------------------------------------
4242+ DATABASE_URL=postgresql://pyqF6iHnFi3LjiFV:HGt9nkXNv6F9xkzN@localhost:5432/kefi
4343+4444+ # Redis
4545+ # ------------------------------------------------------------------------------
4646+ REDIS_HOST=localhost
4747+4848+ # Slack
4949+ # ------------------------------------------------------------------------------
5050+ SLACK_BOT_TOKEN=
5151+ SLACK_TEAM_ID=
5252+5353+ # General
5454+ # ------------------------------------------------------------------------------
5555+ KEFI_SETTINGS_MODULE=kefi.config.local
5656+5757+5858+### 3. Launch the external services
5959+6060+To launch the database an Redis server, you can launch them using `docker-compose`:
6161+6262+ $ docker-compose up --build
6363+6464+### 4. Install the dependencies
6565+6666+You can install the dependencies of the project using [poetry](https://python-poetry.org/),
6767+in a local virtual environment, using the following command:
6868+6969+ $ poetry install
7070+7171+### 5. Run tests
7272+7373+Now, to test that everything is working, you can launch the tests using this command:
7474+7575+ poetry run pytest .