Go to file
2024-07-28 10:55:15 +02:00
requirements Reorganize Order fields, add admin, Upgrade to Django 5.1b1 2024-07-21 19:07:59 +02:00
src Add dynamic admin actions for bulk creating memberships 2024-07-28 10:55:15 +02:00
.dockerignore Cleanup. 2024-07-14 23:14:07 +02:00
.drone.yml Cleanup. 2024-07-14 23:14:07 +02:00
.env.example Cleanup. 2024-07-14 23:14:07 +02:00
.gitignore Waiting list function: WaitingListEntry model for people that can be invited in the future 2024-07-14 19:20:32 +02:00
.pre-commit-config.yaml Merge branch 'main' of git.data.coop:data.coop/membersystem into waiting-list 2024-07-20 22:24:41 +02:00
docker-compose.yml Revert healtcheck on Postgres, do it in the entrypoint 2024-07-24 22:29:07 +02:00
Dockerfile Reorganize Order fields, add admin, Upgrade to Django 5.1b1 2024-07-21 19:07:59 +02:00
entrypoint.sh Revert healtcheck on Postgres, do it in the entrypoint 2024-07-24 22:29:07 +02:00
Makefile Add a few more README things on Docker 2024-07-20 22:34:19 +02:00
pyproject.toml Add dynamic admin actions for bulk creating memberships 2024-07-28 10:55:15 +02:00
README.md Reorganize Order fields, add admin, Upgrade to Django 5.1b1 2024-07-21 19:07:59 +02:00
requirements.txt Reorganize Order fields, add admin, Upgrade to Django 5.1b1 2024-07-21 19:07:59 +02:00

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.

  2. Migrate

    make migrate
    
  3. Run the development server

    make run
    

Building and running other things

# Build the containers
make build

# Create a superuser
make createsuperuser

# Create Django migrations (after this, maybe you need to change file permissions in volume)
make makemigrations

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.

  2. Run migrate

    hatch run dev:migrate
    
  3. Run the development server

    hatch run dev:server
    

Upgrade requirements

We use hatch-pip-compile.

# Install hatch-pip-compile in some environment
pipx install hatch-pip-compile
# Change requirements in pyproject.toml (...)
# Update requirements.txt:
hatch-pip-compile
# Update requirements/requirements-dev.txt:
hatch-pip-compile dev