-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
73 lines (69 loc) · 2.46 KB
/
Copy pathdocker-compose.yml
File metadata and controls
73 lines (69 loc) · 2.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
version: '3.8'
# =============================================================================
# VulTrack Docker Compose
# For local development and testing
# In production, use your own orchestration and reverse proxy
# =============================================================================
services:
# ===========================================================================
# PostgreSQL Database
# ===========================================================================
postgres:
image: postgres:16-alpine
container_name: vultrack-postgres
environment:
POSTGRES_USER: ${POSTGRES_USER:-vultrack}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-vultrack}
POSTGRES_DB: ${POSTGRES_DB:-vultrack}
volumes:
- ./data/postgres:/var/lib/postgresql/data
# Increase /dev/shm so parallel query workers can allocate hash-join memory.
# The default Docker value (64 MB) is exhausted when multiple scans run concurrently.
shm_size: '256m'
command:
- "postgres"
- "-c"
- "max_wal_size=4GB" # avoids frequent WAL checkpoints during large imports (VEX sync)
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-vultrack}"]
interval: 5s
timeout: 5s
retries: 5
restart: unless-stopped
# ===========================================================================
# Go Backend API
# ===========================================================================
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: vultrack-backend
environment:
- POSTGRES_HOST=postgres
- POSTGRES_PORT=5432
- POSTGRES_USER=${POSTGRES_USER:-vultrack}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-vultrack}
- POSTGRES_DB=${POSTGRES_DB:-vultrack}
- BACKEND_PORT=8080
- LOG_LEVEL=${LOG_LEVEL:-info}
ports:
- "${BACKEND_PORT:-8080}:8080"
depends_on:
postgres:
condition: service_healthy
restart: unless-stopped
security_opt:
- no-new-privileges:true
# ===========================================================================
# React Frontend (static files)
# ===========================================================================
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: vultrack-frontend
ports:
- "${FRONTEND_PORT:-3000}:8080"
restart: unless-stopped
security_opt:
- no-new-privileges:true