-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
65 lines (60 loc) · 1.41 KB
/
docker-compose.prod.yml
File metadata and controls
65 lines (60 loc) · 1.41 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
version: '3.8'
services:
db:
image: postgres:15-alpine
container_name: ai_analyzer_postgres_prod
restart: always
environment:
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
POSTGRES_DB: ${POSTGRES_DB:-ai_data_analyzer}
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5432:5432"
redis:
image: redis:7-alpine
container_name: ai_analyzer_redis_prod
restart: always
ports:
- "6379:6379"
volumes:
- redis_data:/data
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: ai_analyzer_backend_prod
restart: always
environment:
- NODE_ENV=production
- DB_HOST=db
- DB_PORT=5432
- DB_USER=${POSTGRES_USER:-postgres}
- DB_PASS=${POSTGRES_PASSWORD:-postgres}
- DB_NAME=${POSTGRES_DB:-ai_data_analyzer}
- REDIS_HOST=redis
- REDIS_PORT=6379
- OPENAI_API_KEY=${OPENAI_API_KEY}
- PORT=3001
ports:
- "3001:3001"
depends_on:
- db
- redis
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: ai_analyzer_frontend_prod
restart: always
environment:
- NODE_ENV=production
- NEXT_PUBLIC_API_URL=http://backend:3001
ports:
- "3000:3000"
depends_on:
- backend
volumes:
postgres_data:
redis_data: