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.

39 lines
1.1 KiB

  1. * Steps for deployment
  2. ** Setup python environment
  3. - Install python 3.7
  4. - Create virtualenv
  5. - Create a new django project
  6. ** Install restscrape package
  7. ** Set up PostgreSQL
  8. - Install postgres
  9. - Create database name
  10. #+begin_src sql :engine postgresql
  11. CREATE DATABASE {database_name};
  12. #+end_src
  13. - Create username and password for postgres
  14. #+begin_src sql :engine postgresql
  15. CREATE USER {user_name} WITH PASSWORD '{password}';
  16. #+end_src
  17. - Set database parameters
  18. #+begin_src sql :engine postgresql
  19. ALTER ROLE {user_name} SET client_encoding TO 'utf8';
  20. ALTER ROLE {user_name} SET default_transaction_isolation TO 'read committed';
  21. ALTER ROLE {user_name} SET timezone TO 'UTC';
  22. #+end_src
  23. - Give privileges to user
  24. #+begin_src sql :engine postgresql
  25. GRANT ALL PRIVILEGES ON DATABASE {database_name} TO {user_name};
  26. #+end_src
  27. - Make user supseruser
  28. #+begin_src sql :engine postgresql
  29. ALTER ROLE {user_name} superuser;
  30. #+end_src
  31. ** Set up celery requirements
  32. *** Set up RabitMQ for message broker [/]
  33. *** Set up Redis for results store [2/3]
  34. - [X] Make sure that it isn't persisting to disk
  35. - [X] Ensure systemd is the supervised
  36. - [ ] Start redis
  37. ** Run as service?