Skip to content

TallerDeProgramacion2-2022-2c-Grupo7/FIUBER-Metrics

Repository files navigation

FIUBER-Metrics

Local installation & usage

  1. Copy the Firebase credentials JSON (firebase_credentials.json) into the src directory of the repository.

  2. Install the requirements.

pip install -r requirements.txt
  1. Create database volume (execute only once).
docker volume create fiuber-metrics-db-volume
  1. Start the PostgreSQL instance.
docker run -it --rm \
    -e POSTGRES_PASSWORD=admin \
    -p 5432:5432 \
    -v fiuber-metrics-db-volume:/var/lib/postgresql/data \
    postgres
  1. In another terminal, start the server:
cd src
uvicorn main:app --reload

The API will be available on http://localhost:8000/.

Local tests execution

Execute the following script to build and run the tests using Docker Compose.

./run_tests.sh

Repository & okteto deployment setup

The following GitHub Actions Secrets are required:

  1. DOCKERHUB_USERNAME
  2. DOCKERHUB_TOKEN
  3. KUBE_CONFIG_DATA (generated with cat kubeconfig.yaml | base64 -w 0)
  4. DATABASE_HOST
  5. DATABASE_PASSWORD
  6. FIREBASE_CREDENTIALS (generated with cat firebase-credentials.json | base64 -w 0)

About

FIUBER's Metrics Service

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published