Skip to content

rivnefish/rivnefish_api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

  1. At first install Django
pip install  django
  1. Next
pip install djangorestframework
  1. Next
pip install django-filter
  1. Install MySQldb
sudo apt-get install python-dev
pip install mysql-python
  1. Run project server
python manage.py runserver 0.0.0.0:8000

Using virtualenv (ubuntu)

sudo apt-get install python-pip
sudo pip install virtualenv

# create virtualenv
virtualenv rivnefish-env

# activate rivnefish-env, this command works only in BASH
source rivnefish-env/bin/activate

# now you can install required packages
pip install -r requirements.txt

# apply migrations
python manage.py migrate

Recommend to add

Django Extensions https://github.com/django-extensions/django-extensions

Shell plus https://github.com/django-extensions/django-extensions/blob/master/docs/shell_plus.rst

Runbooks

If API is not avaliable

by URL http://api.rivnefish.com/admin/site_manager/markers/97/

  1. Next strings should be added into httpd.conf:
cat /usr/local/directadmin/data/users/rivnefish/httpd.conf

WSGIPythonPath /usr/home/rivnefish/domains/api.rivnefish.com/rivnefish-env/lib/python2.7/site-packages

<VirtualHost api.rivnefish.com:80>
    ServerAdmin webmaster@localhost
    ServerName api.rivnefish.com
    WSGIScriptAlias / /usr/home/rivnefish/domains/api.rivnefish.com/rivnefish/RivneFish/wsgi.py
    CustomLog /var/log/httpd/domains/api.rivnefish.com.log homedir
    ErrorLog /var/log/httpd/domains/api.rivnefish.com.error.log
    WSGIPassAuthorization On
</VirtualHost>

<VirtualHost 77.120.80.6:80 >
        ServerName www.ads.rivnefish.com
  1. Restart httpd process

This line should be present in config file:

# grep LoadModule /etc/httpd/conf/httpd.conf
LoadModule wsgi_module /usr/local/libexec/apache22/mod_wsgi.so

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages