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.

41 lines
1010 B

4 years ago
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. ## Should be executed daily
  4. python3 manage.py sendmails
  5. ## versions used in development
  6. python 3.8.2
  7. django 3.1.1
  8. django-formtools 2.2
  9. whitenoise 5.2.0
  10. gunicorn 20.0.4
  11. ## production setup
  12. ln -s foerderbarometer/settings_production.py foerderbarometer/settings.py
  13. edit /secrets.json to contain something similar to
  14. {
  15. "DATABASE_PASSWORD": "THIS IS TOP SECRET!"
  16. }
  17. edit foerderbarometer/settings_production.py according to your database setup (tested with MariaDB 10.0.36)
  18. run the following commands:
  19. python manage.py makemigrations
  20. python manage.py migrate
  21. python manage.py collectstatic
  22. add to cron at least one time a day:
  23. python manage.py sendmails
  24. server starts with
  25. nohup gunicorn --forwarded-allow-ips="*" -b '0:8000' foerderbarometer.wsgi 2&> logfile &