87 lines
2.1 KiB
YAML
87 lines
2.1 KiB
YAML
services:
|
|
db:
|
|
image: postgres:15
|
|
environment:
|
|
POSTGRES_DB: cve_sigma_db
|
|
POSTGRES_USER: cve_user
|
|
POSTGRES_PASSWORD: cve_password
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
|
|
ports:
|
|
- "5432:5432"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U cve_user -d cve_sigma_db"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
|
|
backend:
|
|
build: ./backend
|
|
ports:
|
|
- "8000:8000"
|
|
environment:
|
|
DATABASE_URL: postgresql://cve_user:cve_password@db:5432/cve_sigma_db
|
|
NVD_API_KEY: ${NVD_API_KEY:-}
|
|
GITHUB_TOKEN: ${GITHUB_TOKEN}
|
|
OPENAI_API_KEY: ${OPENAI_API_KEY:-}
|
|
ANTHROPIC_API_KEY: ${ANTHROPIC_API_KEY:-}
|
|
OLLAMA_BASE_URL: ${OLLAMA_BASE_URL:-http://ollama:11434}
|
|
LLM_PROVIDER: ${LLM_PROVIDER:-ollama}
|
|
LLM_MODEL: ${LLM_MODEL:-llama3.2}
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
ollama-setup:
|
|
condition: service_completed_successfully
|
|
volumes:
|
|
- ./backend:/app
|
|
- ./github_poc_collector:/github_poc_collector
|
|
- ./exploit-db-mirror:/app/exploit-db-mirror
|
|
command: uvicorn main:app --host 0.0.0.0 --port 8000 --reload
|
|
|
|
frontend:
|
|
build: ./frontend
|
|
ports:
|
|
- "3000:3000"
|
|
environment:
|
|
REACT_APP_API_URL: http://localhost:8000
|
|
volumes:
|
|
- ./frontend:/app
|
|
- /app/node_modules
|
|
command: npm start
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
ports:
|
|
- "6379:6379"
|
|
command: redis-server --appendonly yes
|
|
volumes:
|
|
- redis_data:/data
|
|
|
|
ollama:
|
|
image: ollama/ollama:latest
|
|
ports:
|
|
- "11434:11434"
|
|
volumes:
|
|
- ollama_data:/root/.ollama
|
|
environment:
|
|
- OLLAMA_HOST=0.0.0.0
|
|
restart: unless-stopped
|
|
|
|
ollama-setup:
|
|
build: ./backend
|
|
depends_on:
|
|
- ollama
|
|
environment:
|
|
OLLAMA_BASE_URL: http://ollama:11434
|
|
LLM_MODEL: llama3.2
|
|
volumes:
|
|
- ./backend:/app
|
|
command: python setup_ollama.py
|
|
restart: "no"
|
|
|
|
volumes:
|
|
postgres_data:
|
|
redis_data:
|
|
ollama_data:
|