-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
123 lines (118 loc) · 3.81 KB
/
Copy pathdocker-compose.yml
File metadata and controls
123 lines (118 loc) · 3.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
services:
# MongoDB Database
mongodb:
image: mongo:7.0
container_name: lumi-mongodb
restart: unless-stopped
environment:
MONGO_INITDB_ROOT_USERNAME: ${MONGO_ROOT_USERNAME:?MONGO_ROOT_USERNAME is required}
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_ROOT_PASSWORD:?MONGO_ROOT_PASSWORD is required}
MONGO_INITDB_DATABASE: lumi
# No external port binding - only accessible within Docker network
# For direct access, use: docker exec -it lumi-mongodb mongosh
volumes:
- mongodb-data:/data/db
- ./mongo-init:/docker-entrypoint-initdb.d:ro
networks:
- lumi-network
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongosh localhost:27017/lumi --quiet
interval: 10s
timeout: 5s
retries: 5
start_period: 20s
# Backend API
backend:
build:
context: ./backend
dockerfile: Dockerfile
target: development
container_name: lumi-backend
restart: unless-stopped
environment:
NODE_ENV: development
PORT: 5000
MONGODB_URI: mongodb://${MONGO_ROOT_USERNAME:?MONGO_ROOT_USERNAME is required}:${MONGO_ROOT_PASSWORD:?MONGO_ROOT_PASSWORD is required}@mongodb:27017/lumi?authSource=admin
JWT_SECRET: ${JWT_SECRET:?JWT_SECRET is required}
JWT_EXPIRES_IN: ${JWT_EXPIRES_IN:-24h}
JWT_REFRESH_SECRET: ${JWT_REFRESH_SECRET:?JWT_REFRESH_SECRET is required}
JWT_REFRESH_EXPIRES_IN: ${JWT_REFRESH_EXPIRES_IN:-7d}
ENCRYPTION_SECRET: ${ENCRYPTION_SECRET:?ENCRYPTION_SECRET is required}
OPENAI_API_KEY: ${OPENAI_API_KEY}
ANTHROPIC_API_KEY: ${ANTHROPIC_API_KEY}
MINIO_ENDPOINT: minio
MINIO_PORT: 9000
MINIO_USE_SSL: false
MINIO_ACCESS_KEY: ${MINIO_ROOT_USER:?MINIO_ROOT_USER is required}
MINIO_SECRET_KEY: ${MINIO_ROOT_PASSWORD:?MINIO_ROOT_PASSWORD is required}
MINIO_EXTERNAL_URL: http://localhost:9002
CORS_ORIGIN: http://localhost:5173,http://localhost:3000
ports:
- "5000:5000"
volumes:
- ./backend/src:/app/src:ro
- ./backend/package.json:/app/package.json:ro
- ./backend/tsconfig.json:/app/tsconfig.json:ro
- backend-node-modules:/app/node_modules
depends_on:
mongodb:
condition: service_healthy
minio:
condition: service_healthy
networks:
- lumi-network
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5000/health"]
interval: 10s
timeout: 5s
retries: 3
start_period: 30s
command: npm run dev
# Frontend React Application
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
target: production
container_name: lumi-frontend
restart: unless-stopped
environment:
VITE_API_URL: http://localhost:5000
ports:
- "3000:8080" # Frontend runs on 8080 internally (non-root)
depends_on:
- backend
networks:
- lumi-network
# MinIO Object Storage (S3-compatible)
minio:
image: minio/minio:latest
container_name: lumi-minio
restart: unless-stopped
environment:
MINIO_ROOT_USER: ${MINIO_ROOT_USER:?MINIO_ROOT_USER is required}
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD:?MINIO_ROOT_PASSWORD is required}
ports:
- "127.0.0.1:9002:9000" # API port - bound to localhost only
- "127.0.0.1:9003:9001" # Web Console port - bound to localhost only
volumes:
- minio-data:/data
command: server /data --console-address ":9001"
networks:
- lumi-network
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
networks:
lumi-network:
driver: bridge
name: lumi-network
volumes:
mongodb-data:
name: lumi-mongodb-data
backend-node-modules:
name: lumi-backend-node-modules
minio-data:
name: lumi-minio-data