-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
105 lines (98 loc) · 2.46 KB
/
docker-compose.yml
File metadata and controls
105 lines (98 loc) · 2.46 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
# Sortify - AI-Powered Cloud Storage
services:
# PostgreSQL Database
postgres:
image: postgres:15
container_name: sortify_postgres
environment:
POSTGRES_DB: sortify_db
POSTGRES_USER: sortify_user
POSTGRES_PASSWORD: sortify_password
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
networks:
- sortify_network
# Redis for Queue Management
redis:
image: redis:7-alpine
container_name: sortify_redis
ports:
- "6379:6379"
volumes:
- redis_data:/data
networks:
- sortify_network
command: redis-server --appendonly yes
# Backend API Server
backend:
build:
context: .
dockerfile: apps/server/Dockerfile
container_name: sortify_backend
environment:
- NODE_ENV=development
- DATABASE_URL=postgresql://sortify_user:sortify_password@postgres:5432/sortify_db
- REDIS_URL=redis://redis:6379
- JWT_SECRET=your-super-secret-jwt-key
- OPENAI_API_KEY=${OPENAI_API_KEY}
- GOOGLE_CLOUD_VISION_API_KEY=${GOOGLE_CLOUD_VISION_API_KEY}
- FRONTEND_URL=http://localhost:3001
- PORT=3002
ports:
- "3002:3002"
volumes:
- ./uploads:/app/uploads
- ./logs:/app/logs
depends_on:
- postgres
- redis
networks:
- sortify_network
restart: unless-stopped
# AI Processing Workers
worker:
build:
context: .
dockerfile: packages/workers/Dockerfile
container_name: sortify_worker
environment:
- NODE_ENV=development
- DATABASE_URL=postgresql://sortify_user:sortify_password@postgres:5432/sortify_db
- REDIS_URL=redis://redis:6379
- OPENAI_API_KEY=${OPENAI_API_KEY}
- GOOGLE_CLOUD_VISION_API_KEY=${GOOGLE_CLOUD_VISION_API_KEY}
volumes:
- ./uploads:/app/uploads
- ./logs:/app/logs
depends_on:
- postgres
- redis
- backend
networks:
- sortify_network
restart: unless-stopped
# Frontend (Next.js)
frontend:
build:
context: .
dockerfile: apps/web/Dockerfile
container_name: sortify_frontend
environment:
- NODE_ENV=development
- NEXT_PUBLIC_API_URL=http://localhost:3002
ports:
- "3001:3001"
depends_on:
- backend
networks:
- sortify_network
restart: unless-stopped
volumes:
postgres_data:
redis_data:
networks:
sortify_network:
driver: bridge