Metadata-Version: 2.4
Name: blbr-scripts
Version: 0.1.0
Summary: BLBR Research Scripts for financial data analysis
Home-page: https://github.com/blbr-research/blbr-scripts
Author: BLBR Research Team
Author-email: info@blbr-research.com
Keywords: finance,trading,data analysis,stock market
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Office/Business :: Financial :: Investment
Classifier: License :: OSI Approved :: MIT License
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: appdirs==1.4.4
Requires-Dist: beautifulsoup4==4.9.3
Requires-Dist: certifi==2025.4.26
Requires-Dist: charset-normalizer==3.4.1
Requires-Dist: click==7.1.2
Requires-Dist: dnspython==2.7.0
Requires-Dist: dotenv==0.9.9
Requires-Dist: idna==3.10
Requires-Dist: jugaad-data==0.27
Requires-Dist: numpy==1.26.4
Requires-Dist: pandas>=2.2.0
Requires-Dist: psutil==7.0.0
Requires-Dist: pymongo==4.12.0
Requires-Dist: python-dateutil==2.9.0.post0
Requires-Dist: python-dotenv==1.1.0
Requires-Dist: pytz==2025.2
Requires-Dist: requests==2.32.3
Requires-Dist: six==1.17.0
Requires-Dist: soupsieve==2.7
Requires-Dist: tzdata==2025.2
Requires-Dist: urllib3==2.4.0
Requires-Dist: packaging==24.2
Requires-Dist: wheel==0.45.1
Requires-Dist: ta==0.11.0
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# BLBR Scripts Docker Setup

This directory contains the Docker configuration for running the BLBR scripts with scheduled execution.

## Overview

The setup includes:

1. **Dockerfile**: Configures a Python environment with cron for scheduled task execution
2. **docker-compose.yml**: Orchestrates the scripts container and MongoDB

## Scheduled Tasks

By default, the following sequence runs daily at 7:00 PM IST (19:30 server time):

```
python run_step.py download
python run_step.py trend
python run_step.py mongodb
```

## Getting Started

### Prerequisites

- Docker and Docker Compose installed on your system

### Running

```bash
# Start the containers (pulls image from Docker Hub)
docker-compose up -d

# View logs
docker-compose logs -f

# Stop the containers
docker-compose down
```

### Testing the Scripts Manually

To run scripts manually without waiting for the scheduled time:

```bash
# Execute into the container
docker exec -it blbr-scripts bash

# Run scripts manually
python run_step.py download
python run_step.py trend
python run_step.py mongodb
```

## Configuration

### Modifying the Schedule

The schedule is configured in the Docker image to run at 7:30 PM IST every day. 

If you need to modify the schedule, you'll need to:

1. Fork the repository containing the Dockerfile
2. Update the cron expression
3. Build and publish your own image
4. Update the docker-compose.yml to use your custom image

### Volume Mounts

The Docker setup uses the following volume mounts:

- `./logs:/app/logs`: Persists log files from the script execution
- `./data:/app/data`: Persists data files
- `/tmp/blbr:/tmp/blbr`: Maps the temporary directory used during processing
- `mongodb_data:/data/db`: Persists the MongoDB data

## Database Access

MongoDB is exposed on port 27017 and can be accessed:

- From host: `mongodb://localhost:27017`
- From other containers: `mongodb://mongodb:27017`
