Sign inSign up

urvish667/reddit-sentiment-analysis

By urvish667

•Updated about 3 years ago

Reddit Sentiment Analysis Docker: Analyze Reddit comments' sentiment with ease.

Image
0

701

urvish667/reddit-sentiment-analysis repository overview

Repository Name: Reddit Sentiment Analysis Docker

Description: This Docker repository is designed to run the Reddit Sentiment Analysis application. It provides a containerized environment for analyzing sentiment in Reddit comments from a specified subreddit. The application offers features such as sentiment visualization, word clouds, keyword frequency analysis, user registration, and login functionality.

Usage Instructions:

  1. Clone this repository to your local environment.
  2. Build the Docker image using the provided Dockerfile.
  3. Run the Docker container with the following command, providing the required environment variables:
docker run -dit --name reddit -p 5000:5000 \
    -e MYSQL_USER=reddit \
    -e MYSQL_PASSWORD=reddit \
    -e MYSQL_DATABASE=reddit_db \
    -e MYSQL_HOSTNAME=mysql-container-name-or-ip \
    -e CLIENT_ID=YOUR_REDDIT_CLIENT_ID \
    -e CLIENT_SECRET=YOUR_REDDIT_CLIENT_SECRET \
    -e USER_AGENT='<App name>/<version> by <username-of-reddit>' \
    reddit-sentiment-analysis

Backend Database (MySQL):

  • For the backend database, you can use the official MySQL Docker image. Make sure to run a MySQL container separately with the following environment variables to set up the database:
    • MYSQL_ROOT_PASSWORD: The root user's password.
    • MYSQL_DATABASE: The name of the MySQL database for the application.
    • MYSQL_USER: The MySQL database username for the application.
    • MYSQL_PASSWORD: The password for the MySQL database user.

Environment Variables:

  • MYSQL_USER: The MySQL database username for the application.
  • MYSQL_PASSWORD: The password for the MySQL database user.
  • MYSQL_DATABASE: The name of the MySQL database to use.
  • MYSQL_HOSTNAME: The hostname or IP address of the MySQL server (container name or IP).
  • CLIENT_ID: Reddit API client ID for authentication.
  • CLIENT_SECRET: Reddit API client secret for authentication.
  • USER_AGENT: User agent string for Reddit API requests.

Dependencies: Python 3.11, Flask, PRAW, TextBlob, Matplotlib, bcrypt, Flask-SQLAlchemy, MySQL database.

Author: Urvish Talaviya


Make sure to replace YOUR_REDDIT_CLIENT_ID and YOUR_REDDIT_CLIENT_SECRET with your actual Reddit API client credentials when running the Docker container. Additionally, replace mysql-container-name-or-ip with the hostname or IP address of the MySQL container running your database. This updated description provides instructions for both the application and the backend database setup.

Tag summary

Content type

Image

Digest

sha256:a48fb9be5…

Size

285.2 MB

Last updated

about 3 years ago

docker pull urvish667/reddit-sentiment-analysis