Skip to content

Recommendation project(FastAPI + SQLAlchemy core 1.4)

Notifications You must be signed in to change notification settings

t1m4/fastapi-recommendations

Repository files navigation

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

About

Recommendation project(FastAPI + SQLAlchemy core 1.4)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages