|
|
* [[Implementation Plan]](Implementation plan)
|
|
|
* [[Setup]](Setup) |
|
|
\ No newline at end of file |
|
|
# Welcome to the ena2pansimple wiki
|
|
|
|
|
|
- [[Implementation Plan]](Implementation plan)
|
|
|
|
|
|
# Setup
|
|
|
|
|
|
## Local
|
|
|
|
|
|
- Clone the repository
|
|
|
|
|
|
- Generate the local environment
|
|
|
|
|
|
```
|
|
|
docker-compose -f local.yml build
|
|
|
```
|
|
|
|
|
|
- Run the local environment
|
|
|
|
|
|
```
|
|
|
docker-compose -f local.yml up
|
|
|
```
|
|
|
|
|
|
- Migrate the database
|
|
|
|
|
|
```
|
|
|
docker-compose -f local.yml run --rm django python manage.py migrate
|
|
|
```
|
|
|
|
|
|
- Create a superuser
|
|
|
|
|
|
```
|
|
|
docker-compose -f local.yml run --rm django python manage.py createsuperuser
|
|
|
```
|
|
|
|
|
|
- Login to the admin interface and go to periodic tasks
|
|
|
|
|
|
There you can select the ena2pansimple harvester.Afterwards you can generate a
|
|
|
period task for ist execution to your liking (e.g. a crontab once a day)
|
|
|
|
|
|
```
|
|
|
http://localhost:8000/admin/django_celery_beat/periodictask/
|
|
|
```
|
|
|
|
|
|
You can use a crontab schedule e.g. every day at 11 p.m.
|
|
|
|
|
|
```
|
|
|
0 23 * * *
|
|
|
```
|
|
|
|
|
|
Below you find a helper to generate the crontab entry you want:
|
|
|
|
|
|
[Crontab-Guru](https://www.url.com)
|
|
|
|
|
|
Also select a:
|
|
|
|
|
|
- Start Date
|
|
|
- Start Time
|
|
|
|
|
|
Save it and the database will be populated automatically.
|
|
|
|
|
|
# References
|
|
|
|
|
|
- [Cookiecutter-Django](https://cookiecutter-django.readthedocs.io/en/latest/developing-locally-docker.html) |