No description
Wanted to use some of the setup for bootstrapping another project, so I had a close look over these couple of items. Reviewed-on: https://git.data.coop/data.coop/membersystem/pulls/35 Reviewed-by: valberg <valberg@orn.li> Co-authored-by: Benjamin Bach <benjamin@overtag.dk> Co-committed-by: Benjamin Bach <benjamin@overtag.dk> |
||
|---|---|---|
| requirements | ||
| src | ||
| .dockerignore | ||
| .drone.yml | ||
| .env.example | ||
| .gitignore | ||
| .pre-commit-config.yaml | ||
| docker-compose.yml | ||
| Dockerfile | ||
| entrypoint.sh | ||
| Makefile | ||
| pyproject.toml | ||
| README.md | ||
| requirements.txt | ||
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
- 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.
- Migrate
make migrate
- 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
- 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.
- Run migrate
hatch run dev:migrate
- Run the development server
hatch run dev:server