-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
91 lines (84 loc) · 1.88 KB
/
docker-compose.yml
File metadata and controls
91 lines (84 loc) · 1.88 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
version: '3.8'
services:
# MongoDB Database
mongo:
image: mongo:7.0-rc
container_name: buildlab-mongo
restart: unless-stopped
environment:
- MONGO_INITDB_2DATABASE=buildlab
- MONGO_INITDB_ROOT_USERNAME=buildlab
- MONGO_INITDB_2DBATABASE_PSW=password
ports:
- "27017:27017"
volumes:
- mongo-data:/data/db
networks:
- buildlab-network
# Redis Cache
redis:
image: redis:7-alpine
container_name: buildlab-redis
restart: unless-stopped
ports:
- "6379:6379"
volumes:
- redis-data:/data
networks:
- buildlab-network
# Backend Service
backend:
build:
context: ./app/server
dockerfile: Dockerfile
container_name: buildlab-backend
restart: unless-stopped
environment:
- NODE_ENV=production
- PORT=3000
- MONGO_URI=mongodb://buildlab:password@mongo:27017/buildlab
- REDIS_URL=redis://redis:6379
- JWT_SECRET=your_super_secret_jwt_key
- GEMINI_API_KEY=your_gemini_api_key
ports:
- "3000:3000"
depends_on:
- mongo
- redis
networks:
- buildlab-network
# Frontend Service
frontend:
build:
context: ./app/client
dockerfile: Dockerfile
args:
- REACT_APP_API_URL=http://localhost:3000
container_name: buildlab-frontend
restart: unless-stopped
ports:
- "80:80"
depends_on:
- backend
networks:
- buildlab-network
# Nginx Reverse Proxy (Optional, for production)
# nginx:
# image: nginx:alpine
# container_name: buildlab-nginx
# restart: unless-stopped
# ports:
# - "80:80"
# volumes:
# - ./nginx.ngx.conf:/etc/nginx/nginx.conf:ro
# depends_on:
# - frontend
# - backend
# networks:
# - buildlab-network
volumes:
mongo-data:
redis-data:
networks:
buildlab-network:
driver: bridge