by Gigi, Joying, Megan and Reem :) Pod 335
We live in a pandemic world where social distancing and germaphobia is the new social norm. Finding friends is becoming more difficult and strangers are becoming stranger! Fear not! Blobber's got your back. Blobber will find friends for you so you'll have a friend to talk to anywhere, anytime online.
Our group worked on a webapp that would allow people to meetup and chat. A user would register to our service, and then sign-in, and join an exciting room.
- Used socketio for the chatroom instant messenging
- Used session-cookies to ensure only login-user have access
- HTML / CSS with a splash of javascript for front-end design
- Postgres for our backend database connected via SqlAlchemy ORM to store user registeration data
- Flask for our web framework
- Gunicorn to load wsgi webserver
- Configure Nginx to reverse proxy
- Created a blobber.tech domain
- Contained our webapp, nginx and database for security and efficiency in docker
- Used docker-compose yaml file to configurae docker containers to interact with each other
- Use cAdvisor, Prometheus and grafana for monitoring container resource usage in real time
- Created a custom CI/CD pipeline with Github Actions and workflow for testing, linting, webhook notification and deployment
- Deployed on AWS with domain name, ip blocking and firewalld
- Use google reCaptcha to help with replay attempts
- Tried Apache docker image inplace of Nginx when troubleshooting SocketIO
- Troubleshooting with Systemctl, Journalctl, Docker-compose logs, free and df
AWS Instance from t2.micro -> t2.small
- Python-Flask
- HTML / CSS
- SocketIO
- Postgres
- NGINX
- cAdvisor
- Prometheus
- Docker containers
- reCaptcha
- Github Actions (CI/CD)
- AWS instance
- Hosted on .tech domain
- IP blocking, domain name only
Make sure you have python3 and pip installed
Create and activate virtual environment using virtualenv
$ python -m venv python3-virtualenv
$ source python3-virtualenv/bin/activate
- Use the package manager pip to install all dependencies
pip install -r requirements.txt
- NOTE Due to a known issue in SocketIO, the app may only be run in production mode
Start flask
$ flask run
- Setup ENV file:
-
create a .env file
-
Include the following information to configure your database and fill in with your information:
- POSTGRES_USER=
- POSTGRES_PASSWORD=
- POSTGRES_HOST=
- POSTGRES_DB=
-
Start a web browser and type in localhost:5000, page will render and can be intereact like any other webpage.