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.

52 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. "SECRET_KEY": "THIS IS ANOTHER SECRET!"
  19. }
  20. edit foerderbarometer/settings_production.py according to your database setup (tested with MariaDB 10.0.36)
  21. run the following commands:
  22. python3 manage.py makemigrations
  23. python3 manage.py migrate
  24. python3 manage.py collectstatic
  25. add to cron at least one time a day:
  26. python3 manage.py sendmails
  27. server starts with
  28. nohup gunicorn --forwarded-allow-ips="*" -b '0:8000' foerderbarometer.wsgi 2&> logfile &
  29. Should be executed at least daily e.g. in crontab
  30. python3 manage.py sendmails