56 lines
1.3 KiB
YAML
56 lines
1.3 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}
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
volumes:
|
|
- ./backend:/app
|
|
- ./github_poc_collector:/github_poc_collector
|
|
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
|
|
|
|
volumes:
|
|
postgres_data:
|
|
redis_data:
|