Skip to content

jeonghanlee/md_inventory

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Parts Inventory app

Required debian packages

  • python (>= 2.7, < 3.0)
  • python-django
  • python-django-djapian
  • libjs-jquery
  • libjs-jquery-tablesorter

Tested with Debian 7 and 8.

Setup

Recommended setup with uWSGI and NGINX.

Required debian packages

  • nginx-full
  • uwsgi
  • uwsgi-plugin-python
# Install dependencies
sudo apt-get install nginx-full uwsgi uwsgi-plugin-python \
 python-django python-django-djapian \
 libjs-jquery libjs-jquery-tablesorter
# Get source
sudo install -d -o$USER /var/inventory
root@kaffee:/var# mkdir inventory
root@kaffee:/var# cd inventory/
root@kaffee:/var/inventory# git clone https://github.com/mdavidsaver/inventory.git /var/inventory
root@kaffee:/var# chown -R root:www-data inventory

git clone https://github.com/mdavidsaver/inventory.git /var/inventory
# Configure uWSGI
sudo cat << EOF > /etc/uwsgi/apps-available/inventory.ini
[uwsgi]

basedir = /var/inventory

uid = $USER
gid = www-data

socket = /var/inventory/socket
chdir = /var/inventory
module=inventory.wsgi:application

master = true
processes = 4
karakiri = 30

plugins = python
EOF
sudo ln -s /etc/uwsgi/apps-available/inventory.ini /etc/uwsgi/apps-enabled/inventory.ini
sudo systemctl enable uwsgi
sudo systemctl start uwsgi

# Configure NGINX
sudo cat << EOF > /etc/nginx/sites-available/inventory
server {
        listen 8000;
        server_name 127.0.0.1;
        location / {
                uwsgi_pass unix:///var/inventory/socket;
                include uwsgi_params;
        }
        location /static {
                root /var/inventory;
        }
        location /media {
                root /var/inventory;
        }
}
EOF
sudo ln -s  /etc/nginx/sites-available/inventory /etc/nginx/sites-enabled/inventory
sudo systemctl enable nginx
sudo systemctl start  nginx

root@kaffee:/var/inventory# python manage.py migrate

systemctl restart uwsgi nginx


# Ready to go
# Check http://127.0.0.1:8000/

License

Copyright (C) 2015 Michael Davidsaver

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see http://www.gnu.org/licenses/.

About

inventory tracking

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 81.0%
  • HTML 17.7%
  • CSS 1.3%