Skip to content

Latest commit

 

History

History
86 lines (55 loc) · 1.17 KB

README.md

File metadata and controls

86 lines (55 loc) · 1.17 KB

Recommendation service

Run project

There are two ways to run service using docker-compose (recommended):

docker-compose up app

or running using poetry:

  1. Update poetry to 1.2.0 version (once)
poetry self update --preview
  1. Create file with env variables (once):
cp .env.example .env
  1. Run docker related services:
docker-compose up db kafka
  1. Run service:
poetry run docker/start.sh

Prepare database

To have some test data on the developer environment, you can recreate the database from backups of the database on staging.

  1. Login to aws:
aws sso login --profile profile_name
  1. Download backups
./docker/dumps-download.sh
  1. Remove database volumes
docker-compose down --volumes

Run tests

docker-compose run --rm test

Database migration

  • autogenerate migration
docker-compose run --rm alembic-autogenerate "Migration message"
  • upgrade to latest version
docker-compose run --rm alembic upgrade heads
  • upgrade to previous version
docker-compose run --rm alembic downgrade -1