Collect data on the Overwatch Mains subreddits
- Python
- Docker
- Docker Compose
-
Follow Reddit's First Steps Guide to obtain a Client ID & Client Secret
-
Create a .env file in the root directory and paste the following inside it:
CLIENT_ID=your-client-id CLIENT_SECRET=your-client-secret USER=your-reddit-username PASSWORD=your-reddit-password USER_AGENT=subcounts by u/your-reddit-username
-
Replace each field in the .env with your credentials.
-
Add the following to the .env for the docker-compose.yml
MYSQL_HOST=localhost MYSQL_PORT=3306 MYSQL_USERNAME=root MYSQL_PASSWORD=password MYSQL_ROOT_PASSWORD=password MYSQL_DB=owmains
If the application is running on another machine, change
localhost
to it's address. Changepassword
to a suitable password. -
Run
docker-compose up -d
-
Create and activate a virtual environment.
python3 -m venv .venv source .venv/bin/activate
-
Install dependencies.
pip install -r requirements.txt