-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
126 lines (119 loc) · 3.53 KB
/
docker-compose.yml
File metadata and controls
126 lines (119 loc) · 3.53 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
services:
# TimescaleDB - PostgreSQL with time-series extension
timescaledb:
image: timescale/timescaledb:2.17.2-pg15
container_name: privaseeai-timescaledb
restart: unless-stopped
environment:
POSTGRES_DB: ${DATABASE_NAME:-privaseeai_security}
POSTGRES_USER: ${DATABASE_USER:-privaseeai}
POSTGRES_PASSWORD: ${DATABASE_PASSWORD:-changeme}
POSTGRES_INITDB_ARGS: "-A scram-sha-256"
volumes:
- timescaledb-data:/var/lib/postgresql/data
- ./scripts/init_db.sql:/docker-entrypoint-initdb.d/init_db.sql:ro
ports:
- "${DATABASE_PORT:-5432}:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DATABASE_USER:-privaseeai} -d ${DATABASE_NAME:-privaseeai_security}"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
networks:
- privaseeai-network
# Redis - Cache and message broker
redis:
image: redis:7-alpine
container_name: privaseeai-redis
restart: unless-stopped
command: redis-server --appendonly yes
volumes:
- redis-data:/data
ports:
- "${REDIS_PORT:-6379}:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
networks:
- privaseeai-network
# PrivaseeAI Security Application
app:
build:
context: .
dockerfile: Dockerfile
container_name: privaseeai-security-app
restart: unless-stopped
depends_on:
timescaledb:
condition: service_healthy
redis:
condition: service_healthy
environment:
# Database Configuration
DATABASE_HOST: timescaledb
DATABASE_PORT: 5432
DATABASE_NAME: ${DATABASE_NAME:-privaseeai_security}
DATABASE_USER: ${DATABASE_USER:-privaseeai}
DATABASE_PASSWORD: ${DATABASE_PASSWORD:-changeme}
# Redis Configuration
REDIS_HOST: redis
REDIS_PORT: 6379
# Application Configuration
APP_ENV: ${APP_ENV:-development}
LOG_LEVEL: ${LOG_LEVEL:-INFO}
PYTHONUNBUFFERED: 1
volumes:
# Mount source code for development (comment out for production)
- ./src/privaseeai_security:/app/privaseeai_security
# Mount logs directory
- app-logs:/app/logs
# Mount data directory
- app-data:/app/data
healthcheck:
test: ["CMD", "python", "/app/scripts/healthcheck.py"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
networks:
- privaseeai-network
# pgAdmin - Database management tool (optional)
# Note: This configuration is for development only. For production,
# enable server mode and master password for better security.
pgadmin:
image: dpage/pgadmin4:8.14
container_name: privaseeai-pgadmin
restart: unless-stopped
environment:
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_EMAIL:-admin@privaseeai.local}
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_PASSWORD:-admin}
PGADMIN_CONFIG_SERVER_MODE: 'False' # Development only - set to 'True' for production
PGADMIN_CONFIG_MASTER_PASSWORD_REQUIRED: 'False' # Development only - set to 'True' for production
volumes:
- pgadmin-data:/var/lib/pgadmin
ports:
- "${PGADMIN_PORT:-5050}:80"
depends_on:
- timescaledb
networks:
- privaseeai-network
profiles:
- admin
volumes:
timescaledb-data:
driver: local
redis-data:
driver: local
app-logs:
driver: local
app-data:
driver: local
pgadmin-data:
driver: local
networks:
privaseeai-network:
driver: bridge