* [x] Adds a ServiceRequest model for all service types
* [x] Pre-define simple service requests to begin with
* [x] Django admin for admins to handle requests
* [x] Notifications for Matrix
* [x] Moved Service Access to `services` app
* [x] Auto-create default service requests for new memberships
* [x] Most simple kinds of tests added
* [x] Fix issue in generating service requests (check for service access firstly)
* [ ] Channel and bot account
## Deployment
1. Create a bot account. Get an access token with:
```
curl -XPOST \
-d '{"type":"m.login.password", "user":"<userid>", "password":"<password>"}' \
"https://data.coop/_matrix/client/r0/login"
```
2. Create an admin room for admins. Add admins + bot. Copy the room ID.
3. Add new environment variables for the setup `MATRIX_ACCESS_TOKEN` and `MATRIX_SERVICE_REQUEST_ADMIN_ROOM`
Reviewed-on: https://git.data.coop/data.coop/membersystem/pulls/59
Co-authored-by: bbb <benjamin@overtag.dk>
Co-committed-by: bbb <benjamin@overtag.dk>
21 lines
566 B
Makefile
21 lines
566 B
Makefile
run:
|
|
@echo "Running the server"
|
|
docker compose up --watch --remove-orphans
|
|
|
|
manage *ARGS:
|
|
@echo "Running manage command"
|
|
docker compose run -w /app/src --rm -u `id -u` app python manage.py {{ARGS}}
|
|
|
|
build:
|
|
@echo "Building the app"
|
|
docker compose build
|
|
|
|
typecheck:
|
|
docker compose run -w /app/src --rm app mypy .
|
|
|
|
test:
|
|
docker compose run --rm app pytest
|
|
|
|
# You need to install Stripe CLI from here to run this: https://github.com/stripe/stripe-cli/releases
|
|
stripe_cli:
|
|
stripe listen --forward-to 0.0.0.0:8000/order/stripe/webhook/
|