-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
139 lines (131 loc) · 3.2 KB
/
docker-compose.yml
File metadata and controls
139 lines (131 loc) · 3.2 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
# Privacy Sentinel AI - Phase 0 Development Stack
version: '3.8'
services:
# FastAPI Backend
fastapi:
build:
context: ./agent
dockerfile: Dockerfile
ports:
- "8000:8000"
depends_on:
- postgres
- redis
environment:
- DATABASE_URL=postgresql://dev:dev@postgres:5432/privacy_sentinel
- DATABASE_URL=postgresql://${POSTGRES_USER:-dev}:${POSTGRES_PASSWORD:-dev}@postgres:5432/${POSTGRES_DB:-privacy_sentinel}
- DB_HOST=postgres
- DB_NAME=privacy_sentinel
- DB_USER=dev
- DB_PASSWORD=dev
- DB_NAME=${POSTGRES_DB:-privacy_sentinel}
- DB_USER=${POSTGRES_USER:-dev}
- DB_PASSWORD=${POSTGRES_PASSWORD:-dev}
- REDIS_URL=redis://redis:6379
- LLM_MODE=development
- LOG_LEVEL=info
- LLM_MODE=${LLM_MODE:-development}
- LOG_LEVEL=${LOG_LEVEL:-info}
volumes:
- ./agent:/app
- ./logs:/app/logs
restart: unless-stopped
networks:
- privacy-net
# PostgreSQL Database
postgres:
image: postgres:15-alpine
environment:
POSTGRES_DB: privacy_sentinel
POSTGRES_USER: dev
POSTGRES_PASSWORD: dev
POOL_BASE_URL: jdbc:postgresql://postgres:5432/privacy_sentinel
ports:
- "5432:5432"
POSTGRES_DB: ${POSTGRES_DB:-privacy_sentinel}
POSTGRES_USER: ${POSTGRES_USER:-dev}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-dev}
expose:
- "5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./database/init.sql:/docker-entrypoint-initdb.d/init.sql
restart: unless-stopped
networks:
- privacy-net
healthcheck:
test: ["CMD-SHELL", "pg_isready -U dev -d privacy_sentinel"]
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER:-dev} -d $${POSTGRES_DB:-privacy_sentinel}"]
interval: 10s
timeout: 5s
retries: 5
# Ollama for Local LLM
ollama:
image: ollama/ollama:latest
volumes:
- ollama_data:/root/.ollama
ports:
- "11434:11434"
networks:
- privacy-net
restart: unless-stopped
# n8n for Workflow Automation
n8n:
image: n8nio/n8n:latest
ports:
- "5678:5678"
environment:
- N8N_HOST=localhost
- N8N_PORT=5678
- N8N_PROTOCOL=http
- NODE_ENV=production
volumes:
- n8n_data:/home/node/.n8n
- ./n8n_workflows:/home/node/workflows
networks:
- privacy-net
restart: unless-stopped
# Redis Cache
redis:
image: redis:7-alpine
ports:
- "6379:6379"
expose:
- "6379"
volumes:
- redis_data:/data
restart: unless-stopped
networks:
- privacy-net
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 3
# Nginx Reverse Proxy (Optional)
nginx:
image: nginx:alpine
profiles:
- web
ports:
- "80:80"
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./nginx/ssl:/etc/nginx/ssl:ro
depends_on:
- fastapi
restart: unless-stopped
networks:
- privacy-net
volumes:
postgres_data:
driver: local
redis_data:
driver: local
ollama_data:
driver: local
n8n_data:
driver: local
networks:
privacy-net:
driver: bridge