-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
188 lines (176 loc) · 4.81 KB
/
docker-compose.prod.yml
File metadata and controls
188 lines (176 loc) · 4.81 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
180
181
182
183
184
185
186
187
188
version: '3.8'
services:
# PostgreSQL Database
postgres:
image: postgres:14-alpine
container_name: aetherguard-postgres
environment:
POSTGRES_DB: ${DB_NAME:-aetherguard}
POSTGRES_USER: ${DB_USER:-postgres}
POSTGRES_PASSWORD: ${DB_PASSWORD:-postgres}
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5432:5432"
networks:
- aetherguard-network
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
# Redis Cache
redis:
image: redis:7-alpine
container_name: aetherguard-redis
ports:
- "6379:6379"
networks:
- aetherguard-network
restart: unless-stopped
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
# Backend API
backend-api:
build:
context: ./backend-api
dockerfile: Dockerfile
container_name: aetherguard-api
environment:
DB_HOST: postgres
DB_PORT: 5432
DB_NAME: ${DB_NAME:-aetherguard}
DB_USER: ${DB_USER:-postgres}
DB_PASSWORD: ${DB_PASSWORD:-postgres}
JWT_SECRET: ${JWT_SECRET}
ENCRYPTION_KEY: ${ENCRYPTION_KEY}
REDIS_HOST: redis
REDIS_PORT: 6379
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}
ports:
- "8081:8081"
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
networks:
- aetherguard-network
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://127.0.0.1:8081/health"]
interval: 30s
timeout: 10s
retries: 3
# ML Services
ml-services:
build:
context: ./ml-services
dockerfile: Dockerfile
container_name: aetherguard-ml
ports:
- "8001:8001"
networks:
- aetherguard-network
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://127.0.0.1:8001/health"]
interval: 30s
timeout: 10s
retries: 3
# Rust Proxy Engine with Production AetherSign
proxy-engine:
build:
context: ./proxy-engine
dockerfile: Dockerfile
container_name: aetherguard-proxy
environment:
# Core Configuration
ML_SERVICE_URL: http://ml-services:8001
BACKEND_API_URL: http://backend-api:8081
RUST_LOG: ${RUST_LOG:-info}
ATTRIBUTION_SECRET_KEY: ${ATTRIBUTION_SECRET_KEY}
# Production AetherSign 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}
NITRO_ENCLAVE_ENABLED: ${NITRO_ENCLAVE_ENABLED:-false}
# LLM Provider Configuration
OPENAI_API_KEY: ${OPENAI_API_KEY}
ANTHROPIC_API_KEY: ${ANTHROPIC_API_KEY}
LLM_PROVIDER_URL: ${LLM_PROVIDER_URL}
ports:
- "8080:8080"
depends_on:
ml-services:
condition: service_healthy
backend-api:
condition: service_healthy
networks:
- aetherguard-network
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://127.0.0.1:8080/health"]
interval: 30s
timeout: 10s
retries: 3
# Web Portal
web-portal:
build:
context: ./web-portal
dockerfile: Dockerfile
args:
VITE_API_URL: ${VITE_API_URL:-http://localhost:8081}
container_name: aetherguard-web
ports:
- "3000:3000"
networks:
- aetherguard-network
restart: unless-stopped
# Admin Portal
admin-portal:
build:
context: ./admin-portal
dockerfile: Dockerfile
args:
VITE_API_URL: ${VITE_API_URL:-http://localhost:8081}
container_name: aetherguard-admin
ports:
- "3001:3001"
networks:
- aetherguard-network
restart: unless-stopped
# Nginx Reverse Proxy
nginx:
image: nginx:alpine
container_name: aetherguard-nginx
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
- ./ssl:/etc/nginx/ssl:ro
ports:
- "80:80"
- "443:443"
depends_on:
- backend-api
- web-portal
- admin-portal
networks:
- aetherguard-network
restart: unless-stopped
networks:
aetherguard-network:
driver: bridge
volumes:
postgres_data:
driver: local