Browse Source

Added steps for deployment

master
Raphael Roberts 7 years ago
parent
commit
cb92f65ff7
  1. 39
      steps_for_deployment.org

39
steps_for_deployment.org

@ -0,0 +1,39 @@
* Steps for deployment
** Setup python environment
- Install python 3.7
- Create virtualenv
- Create a new django project
** Install restscrape package
** Set up PostgreSQL
- Install postgres
- Create database name
#+begin_src sql :engine postgresql
CREATE DATABASE {database_name};
#+end_src
- Create username and password for postgres
#+begin_src sql :engine postgresql
CREATE USER {user_name} WITH PASSWORD '{password}';
#+end_src
- Set database parameters
#+begin_src sql :engine postgresql
ALTER ROLE {user_name} SET client_encoding TO 'utf8';
ALTER ROLE {user_name} SET default_transaction_isolation TO 'read committed';
ALTER ROLE {user_name} SET timezone TO 'UTC';
#+end_src
- Give privileges to user
#+begin_src sql :engine postgresql
GRANT ALL PRIVILEGES ON DATABASE {database_name} TO {user_name};
#+end_src
- Make user supseruser
#+begin_src sql :engine postgresql
ALTER ROLE {user_name} superuser;
#+end_src
** Set up celery requirements
*** Set up RabitMQ for message broker [/]
*** Set up Redis for results store [2/3]
- [X] Make sure that it isn't persisting to disk
- [X] Ensure systemd is the supervised
- [ ] Start redis
** Run as service?
Loading…
Cancel
Save