You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
1.2 KiB

4 years ago
4 years ago
4 years ago
  1. # foerderbarometer
  2. purpose: gather data from intern(WMDE) and extern(volunteers) forms to create a database ('förderdatenbank') and send emails with links for a questionary.
  3. ## installation and development setup
  4. ln -sr foerderbarometer/settings_development.py foerderbarometer/settings.py
  5. run the development server with
  6. python3 manage.py runserver
  7. ## versions used in development
  8. python 3.8.2
  9. django 3.1.1
  10. django-formtools 2.2
  11. whitenoise 5.2.0
  12. gunicorn 20.0.4
  13. ## production setup
  14. ln -sr foerderbarometer/settings_production.py foerderbarometer/settings.py
  15. edit /secrets.json to contain something similar to
  16. {
  17. "DATABASE_PASSWORD": "THIS IS TOP SECRET!"
  18. }
  19. edit foerderbarometer/settings_production.py according to your database setup (tested with MariaDB 10.0.36)
  20. run the following commands:
  21. python3 manage.py makemigrations
  22. python3 manage.py migrate
  23. python3 manage.py collectstatic
  24. add to cron at least one time a day:
  25. python3 manage.py sendmails
  26. server starts with
  27. nohup gunicorn --forwarded-allow-ips="*" -b '0:8000' foerderbarometer.wsgi 2&> logfile &
  28. Should be executed at least daily e.g. in crontab
  29. python3 manage.py sendmails