Skip to content

Commit 47e9ab3

Browse files
committed
chore: add S3 storage toggle, test service in Docker Compose, and boto3 dependency
1 parent f7cb488 commit 47e9ab3

File tree

5 files changed

+24
-1
lines changed

5 files changed

+24
-1
lines changed

.env.example

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ MINIO_ROOT_USER=minioadmin
4040
MINIO_ROOT_PASSWORD=minioadmin
4141

4242
# S3 Configuration (for application)
43+
# Set to "true" to enable S3 storage for digests
44+
# S3_ENABLED=true
4345
# Endpoint URL for the S3 service (MinIO in development)
4446
S3_ENDPOINT=http://minio:9000
4547
# Access key for the S3 bucket (created automatically in development)

.pre-commit-config.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ repos:
113113
files: ^src/
114114
additional_dependencies:
115115
[
116+
boto3>=1.28.0,
116117
click>=8.0.0,
117118
'fastapi[standard]>=0.109.1',
118119
httpx,
@@ -135,6 +136,7 @@ repos:
135136
- --rcfile=tests/.pylintrc
136137
additional_dependencies:
137138
[
139+
boto3>=1.28.0,
138140
click>=8.0.0,
139141
'fastapi[standard]>=0.109.1',
140142
httpx,

compose.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,15 @@ services:
4646
- DEBUG=true
4747
- GITINGEST_SENTRY_ENVIRONMENT=${GITINGEST_SENTRY_ENVIRONMENT:-development}
4848
# S3 Configuration
49+
- S3_ENABLED=true
4950
- S3_ENDPOINT=http://minio:9000
5051
- S3_ACCESS_KEY=${S3_ACCESS_KEY:-gitingest}
5152
- S3_SECRET_KEY=${S3_SECRET_KEY:-gitingest123}
5253
# Use lowercase bucket name to ensure compatibility with MinIO
5354
- S3_BUCKET_NAME=${S3_BUCKET_NAME:-gitingest-bucket}
5455
- S3_REGION=${S3_REGION:-us-east-1}
5556
# Public URL for S3 resources
56-
- S3_ALIAS_HOST=${S3_ALIAS_HOST:-127.0.0.1:9000/${S3_BUCKET_NAME:-gitingest-bucket}}
57+
- S3_ALIAS_HOST=${S3_ALIAS_HOST:-http://127.0.0.1:9000/${S3_BUCKET_NAME:-gitingest-bucket}}
5758
volumes:
5859
# Mount source code for live development
5960
- ./src:/app:ro
@@ -104,6 +105,22 @@ services:
104105
entrypoint: sh
105106
command: -c /setup.sh
106107

108+
# Test service for running tests
109+
test:
110+
build:
111+
context: .
112+
dockerfile: Dockerfile.dev
113+
profiles:
114+
- dev
115+
environment:
116+
- DEBUG=true
117+
- PYTHONPATH=/app:/tests
118+
volumes:
119+
- ./tests:/tests:ro
120+
- ./src:/app/src:ro
121+
working_dir: /tests
122+
command: ["python", "-m", "pytest"]
123+
107124
volumes:
108125
minio-data:
109126
driver: local

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ description="CLI tool to analyze and create text dumps of codebases for LLMs"
55
readme = {file = "README.md", content-type = "text/markdown" }
66
requires-python = ">= 3.8"
77
dependencies = [
8+
"boto3>=1.28.0",
89
"click>=8.0.0",
910
"fastapi[standard]>=0.109.1", # Minimum safe release (https://osv.dev/vulnerability/PYSEC-2024-38)
1011
"httpx",

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
boto3>=1.28.0 # AWS SDK for S3 support
12
click>=8.0.0
23
fastapi[standard]>=0.109.1 # Vulnerable to https://osv.dev/vulnerability/PYSEC-2024-38
34
httpx

0 commit comments

Comments
 (0)