Skip to content

Development Guide

Tomy Hsieh edited this page Nov 22, 2022 · 7 revisions

Setup

  • Install specific python interpreter
pyenv install $(cat .python-version)
  • Setup virtual environment
pyenv shell $(cat .python-version)
poetry env use $(pyenv which python)
  • Install dependencies and generate lock file
poetry install
  • Build image
docker compose --file docker-compose.dev.yml build

Start Development Server

docker compose --file docker-compose.dev.yml up

Create migration script

docker compose --file docker-compose.dev.yml exec tubee flask db migrate -m 'MESSAGE'

Run Test

poetry run flask test --coverage

Run Migration

docker compose --file docker-compose.dev.yml exec tubee flask deploy

Accessing appication and backends

Service Endpoint
Postgres postgres://tubee:tubee@localhost:5432/tubee
RabbitMQ ampq://guest@localhost:5672//
RabbitMQ (Web) http://localhost:15672
Flask http://localhost:5000