From 9f58bf063ddc59cba2ff01eaaebdc6ec9db5c469 Mon Sep 17 00:00:00 2001 From: suyash469 Date: Tue, 23 Dec 2025 20:45:23 +0530 Subject: [PATCH] Feat: Add Docker support for Postgres and update documentation --- .gitignore | 14 ++++++++++++++ README.md | 9 ++++++++- docker-compose.yml | 18 ++++++++++++++++++ 3 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 .gitignore create mode 100644 docker-compose.yml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..88d1613 --- /dev/null +++ b/.gitignore @@ -0,0 +1,14 @@ +# Docker (New) +.docker/ +postgres_data/ +docker-compose.override.yml + +# Security & Python (Standard) +.env +__pycache__/ +*.py[cod] +venv/ +Data/ +*.db +*.json +*.csv \ No newline at end of file diff --git a/README.md b/README.md index b1fd0d7..245be4c 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,14 @@ Repository Finder is a tool that identifies and analyzes open-source repositorie ``` GITHUB_TOKEN=your_personal_access_token OPENAI_API_KEY=your_openai_token # Optional: only needed for LLM-based models - ``` + ### Database Setup (Optional) +To run a production-ready PostgreSQL database instead of the default SQLite: + +1. Ensure [Docker Desktop](https://www.docker.com/products/docker-desktop/) is installed and running. +2. Start the database: + ```bash + docker-compose up -d + ``` ## Scraping diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..26d7785 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,18 @@ +version: '3.8' + +services: + db: + image: postgres:15-alpine + container_name: repofinder_postgres + restart: always + environment: + POSTGRES_USER: ${POSTGRES_USER:-admin} + POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-password} + POSTGRES_DB: ${POSTGRES_DB:-repofinder} + ports: + - "5432:5432" + volumes: + - postgres_data:/var/lib/postgresql/data + +volumes: + postgres_data: \ No newline at end of file