Skip to content

Backend for a Face Recognition System-Based Photo Manager Designed for the Digiboxx Hackathon

License

Notifications You must be signed in to change notification settings

shubhamistic/DIGIBOXX-HACKATHON

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DIGIBOXX-HACKATHON

Backend for Face Recognition System designed for the Digiboxx.com Hackathon

Explore the docs »
· Report Bug · Request Feature ·

SETUP (Ubuntu)

sudo apt update
  • Install required packages for mysqlclient:

    sudo apt install pkg-config
    sudo apt install libmysqlclient-dev
    sudo apt-get install libpython3.9-dev default-libmysqlclient-dev build-essential
  • Install NGINX:

    sudo apt install nginx
  • Open nginx configuration file:

    sudo nano /etc/nginx/sites-available/default

    Clear the contents of the file and add the following lines (SAVE & EXIT):

    server {
      server_name <example.com> <vpc-ip-address>;
      location / {
          include proxy_params;
          proxy_pass http://localhost:5001;
      }
    
      location /socket.io {
        include proxy_params;
        proxy_http_version 1.1;
        proxy_buffering off;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";
        proxy_pass http://localhost:5001/socket.io;
      }
    }
    
  • Make sure nginx is listening to port 80 and 443:

    sudo iptables -I INPUT -p TCP --dport 80 -j ACCEPT
    sudo iptables -I INPUT -p TCP --dport 443 -j ACCEPT
  • Open bash profile:

    sudo nano ~/.bash_profile
  • Append these lines inside bash profile (SAVE & EXIT):

    export SECRET_KEY="<your-secret-key(any random string)>"
    export DB_USER="<your mysql username>"
    export DB_PASS="<your mysql password>"
    
  • Execute commands from a bash_profile in current shell environment:

    source ~/.bash_profile
  • Install MySQL:

    sudo apt install mysql-server
  • Change MySQL password:

    sudo mysql
    ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
  • DATABASE CONFIGURATION

    • Run these commands in your mysql terminal
  • Install virtualenv:

    sudo apt install virtualenv
  • Install the repository:

    git clone https://github.com/shubhamistic/DIGIBOXX-HACKATHON.git
  • Activate virtualenv and install the modules (use byobu):

    virtualenv DIGIBOXX-HACKATHON
    cd DIGIBOXX-HACKATHON
    source ~/.bash_profile
    source bin/activate
    pip install --no-cache-dir -r requirements.txt
  • Run the server using:

    gunicorn -k geventwebsocket.gunicorn.workers.GeventWebSocketWorker -w 1 -b 127.0.0.1:5001 app:app

About the Author

This repository is maintained by shubhamistic, a passionate programmer and web developer. Explore my projects and join me on my journey to create innovative solutions and push the boundaries of what's possible.

(back to top)

About

Backend for a Face Recognition System-Based Photo Manager Designed for the Digiboxx Hackathon

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages