Giter Site home page Giter Site logo

jtl-lab / memerr Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 670 KB

A cloud-based social media application that allows users to effectively view, post, and interact with curated memes!

HTML 31.28% CSS 10.52% JavaScript 0.99% Shell 0.03% Python 53.70% Jupyter Notebook 3.47%
cloud-application memes social-media-app

memerr's Introduction

Memerr

A cloud-based social media application that allows users to effectively view, post, and interact with curated memes!

Group Members

  • Julia Lewandowski (jtl2189)
  • Robert Chang (rc3398)
  • Uttam Gurram (ug2146)
  • Kanishk Singh (ks4038)

Architecture Diagram

alt text


Python venv Instructions

Run at the Project root folder.

python3 -m venv .venv
source .venv/bin/activate
pip3 install -r requirements.txt
pip3 install --upgrade pip

To deactivate the venv: deactivate

Set Environment Variables -

export FLASK_APP=app
export FLASk_ENV=development

Start Server

python3 -m flask run --host=0.0.0.0 --port=5001

ngrok Setup with Brew and Use

AWS App Client only allows for https and localhost in Callback URLs, so you may need to use ngrok to tunnel http traffic to https via ngrok.

brew install --cask ngrok
ngrok http https://127.0.0.1:5000

Instructions for Updating the code manually on EC2

Go to the parent directory of your frontend/ Ensure that the pem file is also in this directory

zip frontend.zip frontend/
scp -i "memerr-kp.pem" "frontend.zip" [email protected]:/home/ec2-user
ssh -i "memerr-kp.pem" [email protected]
unzip frontend.zip -d tmp/ # replace All
cd /home/ec2-user/frontend
source .venv/bin/activate
pip3 install -r requirements.txt
export FLASK_APP=app
export FLASk_ENV=development
python3 -m flask run --host=0.0.0.0 --port=5000

Instructions for running Gunicorn

After running the above. Run this

gunicorn --workers 3 --bind unix:/home/ec2-user/frontend/app.sock -m 007 app:app

Instructions for NGINX setup

sudo yum update
sudo yum install nginx
sudo systemctl start nginx
sudo systemctl enable nginx
sudo vim /etc/nginx/nginx.conf

Update this file by adding a server block (see nginx.config). For Debug/Testing you will use Flask default server; for PROD, you will switch to Gunicorn and swap the proxy_pass line below and restart NGINX. Then run

sudo nginx -t
sudo systemctl restart nginx

Instructions for Self-signed cert on EC2

sudo mkdir -p /etc/nginx/ssl/
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/nginx/ssl/nginx.key -out /etc/nginx/ssl/nginx.crt

unzip frontend.zip -d tmp/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.