-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
179 lines (167 loc) · 5.11 KB
/
Copy pathdocker-compose.yml
File metadata and controls
179 lines (167 loc) · 5.11 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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
version: '3.8'
services:
# Backend API Service
backend-api:
build:
context: ./backend-api
dockerfile: Dockerfile
ports:
- "8081:8081"
environment:
- JWT_SECRET=${JWT_SECRET:-aetherguard-jwt-secret-change-in-production}
- DATABASE_URL=${DATABASE_URL:-postgresql://aetherguard:password@postgres:5432/aetherguard}
- ENCRYPTION_KEY=${ENCRYPTION_KEY:-aetherguard-encryption-key-32ch}
- CORS_ORIGINS=${CORS_ORIGINS:-http://localhost:3000,http://localhost:3001,http://localhost:5173}
- DEFAULT_ADMIN_PASSWORD=${DEFAULT_ADMIN_PASSWORD:-admin123}
- DEFAULT_OPENAI_MODEL=${DEFAULT_OPENAI_MODEL:-gpt-3.5-turbo}
- DEFAULT_ANTHROPIC_MODEL=${DEFAULT_ANTHROPIC_MODEL:-claude-3-sonnet-20240229}
# SMTP Configuration (optional)
- SMTP_HOST=smtp.gmail.com
- SMTP_PORT=587
- SMTP_USER=
- SMTP_PASSWORD=
- SMTP_FROM=noreply@aetherguard.ai
- SMTP_USE_TLS=true
depends_on:
- postgres
healthcheck:
test: ["CMD", "curl", "-f", "http://127.0.0.1:8081/health"]
interval: 30s
timeout: 10s
retries: 3
networks:
- aetherguard
# ML Services
ml-services:
build:
context: ./ml-services
dockerfile: Dockerfile
ports:
- "8001:8001"
environment:
- DATABASE_URL=${DATABASE_URL:-postgresql://aetherguard:password@postgres:5432/aetherguard}
- HUGGINGFACE_TOKEN=${HUGGINGFACE_TOKEN:-hf_your-huggingface-token-here}
depends_on:
- postgres
healthcheck:
test: ["CMD", "curl", "-f", "http://127.0.0.1:8001/health"]
interval: 30s
timeout: 10s
retries: 3
networks:
- aetherguard
# Rust Proxy Engine with Production AetherSign
proxy-engine:
build:
context: ./proxy-engine
dockerfile: Dockerfile
ports:
- "8080:8080"
environment:
- ML_SERVICE_URL=http://ml-services:8001
- BACKEND_API_URL=http://backend-api:8081
- DATABASE_URL=${DATABASE_URL:-postgresql://aetherguard:password@postgres:5432/aetherguard}
- RUST_LOG=info
- ATTRIBUTION_SECRET_KEY=${ATTRIBUTION_SECRET_KEY:-aetherguard-attribution-key}
# AetherSign Production Configuration
- AWS_REGION=${AWS_REGION:-us-east-1}
- AWS_KMS_KEY_ID=${AWS_KMS_KEY_ID}
- QLDB_LEDGER_NAME=${QLDB_LEDGER_NAME:-aetherguard-provenance}
- AETHERSIGN_ALGORITHM=${AETHERSIGN_ALGORITHM:-RsaPkcs1v15Sha256}
- AETHERSIGN_CACHE_SIZE=${AETHERSIGN_CACHE_SIZE:-10000}
- AETHERSIGN_CACHE_TTL=${AETHERSIGN_CACHE_TTL:-3600}
- AETHERSIGN_KEY_ROTATION_DAYS=${AETHERSIGN_KEY_ROTATION_DAYS:-90}
# AWS Credentials (for local development - use IAM roles in production)
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
# LLM Provider Configuration (uncomment and configure one):
# - OPENAI_API_KEY=
# - ANTHROPIC_API_KEY=sk-ant-your-anthropic-key-here
# - LLM_PROVIDER_URL=https://api.openai.com/v1/chat/completions
depends_on:
- ml-services
- backend-api
healthcheck:
test: ["CMD", "curl", "-f", "http://127.0.0.1:8080/health"]
interval: 30s
timeout: 10s
retries: 3
networks:
- aetherguard
# Web Portal
web-portal:
build:
context: ./web-portal
dockerfile: Dockerfile
ports:
- "3000:3000"
environment:
- NODE_ENV=development
# Note: These URLs are used by the browser (client-side), not the container
# So they should point to localhost from the user's perspective
- VITE_API_URL=http://localhost:8081
- VITE_ML_API_URL=http://localhost:8001
- VITE_PROXY_URL=http://localhost:8080
depends_on:
- backend-api
volumes:
- ./web-portal/src:/app/src
- ./web-portal/public:/app/public
networks:
- aetherguard
# Admin Portal
admin-portal:
build:
context: ./admin-portal
dockerfile: Dockerfile
ports:
- "3001:3001"
environment:
- NODE_ENV=development
- VITE_API_URL=${VITE_API_URL:-http://localhost:8081}
depends_on:
- backend-api
volumes:
- ./admin-portal/src:/app/src
- ./admin-portal/public:/app/public
networks:
- aetherguard
# PostgreSQL Database
postgres:
image: postgres:15-alpine
environment:
- POSTGRES_DB=${DB_NAME:-aetherguard}
- POSTGRES_USER=${DB_USER:-aetherguard}
- POSTGRES_PASSWORD=${DB_PASSWORD:-password}
volumes:
- postgres_data:/var/lib/postgresql/data
- ./backend-api/migrations:/docker-entrypoint-initdb.d
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U aetherguard"]
interval: 30s
timeout: 10s
retries: 5
networks:
- aetherguard
# Redis (for caching and sessions)
redis:
image: redis:7-alpine
ports:
- "6379:6379"
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 30s
timeout: 10s
retries: 3
networks:
- aetherguard
volumes:
postgres_data:
redis_data:
networks:
aetherguard:
driver: bridge