/componentsdb

Primary LanguagePythonMIT LicenseMIT

Components database

An experimental database for storing electronics components.

Getting started

  1. Install Task

  2. Install pre-commit

  3. Install pre-commit hooks, pull docker images, build containers and start the application:

    task

The application is available at http://localhost:3000/ proxied via traefik to allow requests to be passed to the backend. The backend is available at http://localhost:8000/ and the frontend dev server itself is available at http://localhost:3001/ should you need it.

The traefik dashboard is at http://localhost:8080/

Tasks

Start application:

task up

Stop application:

task down

Stop application and remove volumes

task down-hard

Database

Open a psql client on the database

task psql

Backend

Installing dependencies

poetry -C backend install

Generating migrations

docker compose run --rm alembic revision --autogenerate -m '... message ...'

Running tests

poe -C backend test

Or, containerised,

docker compose run --rm backend-test

Or, via task,

task test