Skip to content

Installation Guide

Local Installation

  1. Clone the repository and create a .env file in the root of the project, use .env.example as a template Remember to replace the values of the variables with your own values.
git clone https://github.com/rafnixg/bcv-api.git
cd bcv-api
cp .env.example .env
  1. Create a virtual environment
python -m venv venv
  1. Activate the virtual environment
# Windows
venv\Scripts\activate
# Linux
source venv/bin/activate
  1. Install the dependencies
pip install -r requirements.txt
  1. Run the API
uvicorn bcv_api.main:app --reload
  1. Open your browser and go to http://localhost:8000

Using Docker

  1. Clone the repository and create a .env file in the root of the project, use .env.example as a template Remember to replace the values of the variables with your own values.
git clone https://github.com/rafnixg/bcv-api.git
cd bcv-api
cp .env.example .env
  1. Build the image with the Dockerfile, select the Dockerfile.newrelic file if you want to monitor the application with NewRelic
# Without newrelic monitoring
docker build -t bcv-api .

# With newrelic monitoring
docker build -t bcv-api -f Dockerfile.newrelic .
  1. Run the container
docker run -d --name bcv-api -p 8000:8000 --env-file .env bcv-api:latest
  1. Open your browser and go to http://localhost:8000