-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
121 lines (113 loc) · 3.22 KB
/
Copy pathdocker-compose.prod.yml
File metadata and controls
121 lines (113 loc) · 3.22 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
# Production docker-compose using pre-built images from GitHub Container Registry
# Usage: docker-compose -f docker-compose.prod.yml up -d
#
# Before running, set the following environment variables:
# - FILEAI_VERSION: The version tag to use (e.g., v1.0.0, latest)
# - JWT_SECRET: Your secret key for JWT tokens
# - GITHUB_OWNER: Your GitHub username or organization name
#
# Example:
# export FILEAI_VERSION=v1.0.0
# export JWT_SECRET=your-super-secret-key
# export GITHUB_OWNER=your-github-username
# docker-compose -f docker-compose.prod.yml up -d
version: '3.8'
services:
# MongoDB
mongodb:
image: mongo:7
container_name: fileai-mongodb
restart: unless-stopped
ports:
- "27017:27017"
environment:
MONGO_INITDB_DATABASE: fileai
volumes:
- mongodb_data:/data/db
networks:
- fileai-network
# Qdrant Vector Database
qdrant:
image: qdrant/qdrant:latest
container_name: fileai-qdrant
restart: unless-stopped
ports:
- "6333:6333"
- "6334:6334"
volumes:
- qdrant_data:/qdrant/storage
networks:
- fileai-network
# MinIO (S3-compatible storage)
minio:
image: minio/minio:latest
container_name: fileai-minio
restart: unless-stopped
ports:
- "9000:9000"
- "9001:9001"
environment:
MINIO_ROOT_USER: ${MINIO_ROOT_USER:-minioadmin}
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD:-minioadmin}
command: server /data --console-address ":9001"
volumes:
- minio_data:/data
networks:
- fileai-network
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
# Backend Server (Pre-built image)
server:
image: ghcr.io/${GITHUB_OWNER:-your-github-username}/search-pdf/server:${FILEAI_VERSION:-latest}
container_name: fileai-server
restart: unless-stopped
ports:
- "3001:3001"
environment:
- NODE_ENV=production
- PORT=3001
- MONGODB_URI=mongodb://mongodb:27017/fileai
- QDRANT_URL=http://qdrant:6333
- OLLAMA_BASE_URL=${OLLAMA_BASE_URL:-http://host.docker.internal:11434}
- OLLAMA_MODEL=${OLLAMA_MODEL:-llama3}
- OLLAMA_EMBEDDING_MODEL=${OLLAMA_EMBEDDING_MODEL:-nomic-embed-text}
- JWT_SECRET=${JWT_SECRET:?JWT_SECRET is required}
- STORAGE_TYPE=minio
- S3_ENDPOINT=http://minio:9000
- S3_BUCKET=fileai
- S3_ACCESS_KEY_ID=${MINIO_ROOT_USER:-minioadmin}
- S3_SECRET_ACCESS_KEY=${MINIO_ROOT_PASSWORD:-minioadmin}
- S3_REGION=us-east-1
depends_on:
- mongodb
- qdrant
- minio
networks:
- fileai-network
volumes:
- uploads_data:/app/uploads
# Frontend Web App (Pre-built image)
web:
image: ghcr.io/${GITHUB_OWNER:-your-github-username}/search-pdf/web:${FILEAI_VERSION:-latest}
container_name: fileai-web
restart: unless-stopped
ports:
- "3000:3000"
environment:
- NODE_ENV=production
- NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL:-http://localhost:3001/trpc}
depends_on:
- server
networks:
- fileai-network
volumes:
mongodb_data:
qdrant_data:
minio_data:
uploads_data:
networks:
fileai-network:
driver: bridge