membersystem/README.md
Víðir Valberg Guðmundsson 7a3a629d6f
All checks were successful
continuous-integration/drone/push Build is passing
Update requirements compilation to use hatch-pip-compile.
2024-07-31 23:26:40 +02:00

1.5 KiB

data.coop member system

Development setup

There are two ways to setup the development environment.

  • Using the Docker Compose setup provided in this repository.
  • Using hatch in your host OS.

Using Docker Compose

Working with the Docker Compose setup is made easy with the Makefile provided in the repository.

Requirements

  • Docker
  • docker compose plugin

Setup

  1. Setup .env file

An example .env file is provided in the repository. You can copy it to .env file using the following command:

cp .env.example .env

The default values in the .env file are suitable for the docker-compose setup.

  1. Migrate
make migrate
  1. Run the development server
make run

Using hatch

Requirements

  • Python 3.12 or higher
  • hatch (Recommended way to install is using pipx install hatch)
  • A running PostgreSQL server

Setup

  1. Setup .env file

An example .env file is provided in the repository. You can copy it to .env file using the following command:

cp .env.example .env

Edit the .env file and set the values for the environment variables, especially the database variables.

  1. Run migrate
hatch run dev:migrate
  1. Run the development server
hatch run dev:server

Updating requirements

If you want to update the requirements, you can run the following command:

hatch run requirements

This uses hatch-pip-compile to update the requirements.