Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Dependencies
node_modules/
venv/

# Build artifacts
dist/
build/
*.pyc
__pycache__/

# Test artifacts
coverage/
playwright-report/
test-results/
.vitest/

# IDE
.vscode/
.idea/
*.swp
*.swo

# Environment
.env
.env.local
.env.test

# Logs
*.log
npm-debug.log*

# OS
.DS_Store
Thumbs.db
87 changes: 87 additions & 0 deletions docker-compose.ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# Docker Compose configuration for CI/test environment
# Note: 'version' field is omitted as it's obsolete in modern Docker Compose
services:
# PostgreSQL for test data
postgres-test:
image: postgres:15-alpine
environment:
POSTGRES_USER: testuser
POSTGRES_PASSWORD: testpass
POSTGRES_DB: sherlock_test
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U testuser -d sherlock_test"]
interval: 10s
timeout: 5s
retries: 5
tmpfs:
- /var/lib/postgresql/data

# Redis for caching in tests
redis-test:
image: redis:7-alpine
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 3s
retries: 5
command: redis-server --save "" --appendonly no

# MongoDB for test data
mongo-test:
image: mongo:6.0
environment:
MONGO_INITDB_ROOT_USERNAME: testuser
MONGO_INITDB_ROOT_PASSWORD: testpass
MONGO_INITDB_DATABASE: sherlock_test
ports:
- "27017:27017"
healthcheck:
test: ["CMD", "mongosh", "--eval", "db.adminCommand('ping')"]
interval: 10s
timeout: 5s
retries: 5
tmpfs:
- /data/db

# Kafka for messaging tests
zookeeper-test:
image: confluentinc/cp-zookeeper:7.4.0
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
healthcheck:
test: ["CMD", "nc", "-z", "localhost", "2181"]
interval: 10s
timeout: 5s
retries: 5

kafka-test:
image: confluentinc/cp-kafka:7.4.0
depends_on:
zookeeper-test:
condition: service_healthy
ports:
- "9092:9092"
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: zookeeper-test:2181
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka-test:29092,PLAINTEXT_HOST://localhost:9092
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_NUM_PARTITIONS: 3
KAFKA_AUTO_CREATE_TOPICS_ENABLE: "true"
KAFKA_LOG_RETENTION_MS: 300000
KAFKA_LOG_SEGMENT_BYTES: 104857600
healthcheck:
test: ["CMD", "kafka-broker-api-versions", "--bootstrap-server", "localhost:9092"]
interval: 15s
timeout: 10s
retries: 5

networks:
default:
name: sherlock-test-network
Loading