-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
76 lines (68 loc) · 1.6 KB
/
docker-compose.yml
File metadata and controls
76 lines (68 loc) · 1.6 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
74
version: '3.8'
services:
backend:
build:
context: .
dockerfile: Dockerfile
ports:
- "8000:8000"
environment:
- SQLAUDITOR_LOG_LEVEL=INFO
- SQLAUDITOR_DEMO_DB=/app/backend/db/demo.sqlite
- DEFAULT_DIALECT=postgres
- OPENAI_API_KEY=${OPENAI_API_KEY:-}
- SQLAUDITOR_POSTGRES_URL=postgresql://postgres:postgres@db:5432/sqlauditor
volumes:
- ./backend/db:/app/backend/db
- ./backend:/app/backend
depends_on:
- db
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:8000/api/health" ]
interval: 30s
timeout: 10s
retries: 3
restart: unless-stopped
db:
image: postgres:15-alpine
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=sqlauditor
ports:
- "5433:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
restart: unless-stopped
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
ports:
- "5173:5173"
volumes:
- ./frontend:/app
- /app/node_modules
environment:
- VITE_API_URL=http://localhost:8000
depends_on:
- backend
restart: unless-stopped
prometheus:
image: prom/prometheus:latest
ports:
- "9090:9090"
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
restart: unless-stopped
grafana:
image: grafana/grafana:latest
ports:
- "3000:3000"
environment:
- GF_SECURITY_ADMIN_PASSWORD=admin
depends_on:
- prometheus
restart: unless-stopped
volumes:
postgres_data: