Commit 595c581a authored by Bengfort's avatar Bengfort
Browse files

Merge branch 'readme-install' into 'main'

Improve README

See merge request !18
parents e70dbd7f 3d55c45a
Pipeline #10646 passed with stages
in 2 minutes and 49 seconds
Castellum Scheduler -- an open source tool for scheduling appointments Castellum Scheduler -- an open source tool for scheduling appointments
Scheduler allows a group of people to coordinate so that everyone gets Scheduler allows users to set up a set of timeslots and generate unique
at most one of the available time slots. In a way this is the opposite invitation links. Each invited person can then pick a free slot without
of doodle where everyone agrees on the same time slot. needing to log in. In a way this is the opposite of doodle where
everyone agrees on the same time slot.
Scheduler is part of the [Castellum][1] project, but can be used with Scheduler is part of the [Castellum][1] project, but can be used with
other tools just as well. other tools just as well.
# Installation # Installation
## Development
For development, a single `make` will install all dependencies and start For development, a single `make` will install all dependencies and start
the server. You can log in as "admin" with password "password". the server. You can log in as "admin" with password "password".
# Development with Castellum
If you want to run the scheduler alongside castellum for development you If you want to run the scheduler alongside castellum for development you
need to set the following settings in castellum: need to set the following settings in castellum:
``` ```python
SCHEDULER_URL = 'http://localhost:8001' SCHEDULER_URL = 'http://localhost:8001'
SCHEDULER_TOKEN = 'CHANGEME' SCHEDULER_TOKEN = 'CHANGEME'
``` ```
## Production
There are many different ways to deploy a django application. Please see
the [django documentation][2] for details. A complete example is also
availabe in the [castellum documentation][3].
Most important steps:
- Create a settings file and set the `DJANGO_SETTINGS_MODULE`
environment variable accordingly
- Provide values `SECRET_KEY`, `PING_URL`, and `API_TOKEN` in the
settings file you just created
- Setup a database and add the relevant information to the settings
file
- Add links to the imprint and data protection information to `NAV`.
You can either create them with an external CMS or by using [django
flatpages][5].
- Configure authentication, e.g. [LDAP][4]
## Network communication
This system is designed so that castellum can remain in a secure
internal network and only the scheduler is accessible from the internet.
Communication between scheduler and castellum must be possible in both
directions.
# API # API
All API requests must send an `Authorization` header with the secret All API requests must send an `Authorization` header with the secret
...@@ -42,9 +69,15 @@ described above. ...@@ -42,9 +69,15 @@ described above.
Example: Example:
$ curl -X PUT -H 'Authorization: token CHANGEME' http://localhost:8001/api/1/foo/ ```sh
$ curl -X GET -H 'Authorization: token CHANGEME' http://localhost:8001/api/1/foo/ $ curl -X PUT -H 'Authorization: token CHANGEME' http://localhost:8001/api/1/foo/
{"datetime": "2020-11-03T07:00:00"} $ curl -X GET -H 'Authorization: token CHANGEME' http://localhost:8001/api/1/foo/
$ curl -X DELETE -H 'Authorization: token CHANGEME' http://localhost:8001/api/1/foo/ {"datetime": "2020-11-03T07:00:00"}
$ curl -X DELETE -H 'Authorization: token CHANGEME' http://localhost:8001/api/1/foo/
```
[1]: https://www.mpib-berlin.mpg.de/research-data/castellum [1]: https://www.mpib-berlin.mpg.de/research-data/castellum
[2]: https://docs.djangoproject.com/en/stable/howto/deployment/
[3]: https://git.mpib-berlin.mpg.de/castellum/castellum/-/tree/main/docs/example_deployment
[4]: https://django-auth-ldap.readthedocs.io/en/latest/
[5]: https://docs.djangoproject.com/en/stable/ref/contrib/flatpages/
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment