-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
85 lines (79 loc) · 1.74 KB
/
Copy pathdocker-compose.yml
File metadata and controls
85 lines (79 loc) · 1.74 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
version: '3.8'
services:
# MongoDB
mongodb:
image: mongo:7
container_name: smarthr_mongo
restart: unless-stopped
ports:
- "27017:27017"
volumes:
- mongo_data:/data/db
environment:
MONGO_INITDB_DATABASE: smarthr_nexus
networks:
- smarthr_network
# Redis
redis:
image: redis:7-alpine
container_name: smarthr_redis
restart: unless-stopped
ports:
- "6379:6379"
volumes:
- redis_data:/data
networks:
- smarthr_network
# Backend API
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: smarthr_backend
restart: unless-stopped
ports:
- "5000:5000"
environment:
NODE_ENV: production
PORT: 5000
MONGODB_URI: mongodb://mongodb:27017/smarthr_nexus
REDIS_URL: redis://redis:6379
JWT_SECRET: ${JWT_SECRET}
JWT_REFRESH_SECRET: ${JWT_REFRESH_SECRET}
GEMINI_API_KEY: ${GEMINI_API_KEY}
SMTP_HOST: ${SMTP_HOST}
SMTP_PORT: ${SMTP_PORT}
SMTP_USER: ${SMTP_USER}
SMTP_PASS: ${SMTP_PASS}
CLIENT_URL: ${CLIENT_URL}
ALLOWED_ORIGINS: ${ALLOWED_ORIGINS}
volumes:
- ./backend/uploads:/app/uploads
- ./backend/logs:/app/logs
depends_on:
- mongodb
- redis
networks:
- smarthr_network
# Frontend
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
args:
VITE_API_URL: /api/v1
VITE_GEMINI_API_KEY: ${VITE_GEMINI_API_KEY}
container_name: smarthr_frontend
restart: unless-stopped
ports:
- "80:80"
depends_on:
- backend
networks:
- smarthr_network
volumes:
mongo_data:
redis_data:
networks:
smarthr_network:
driver: bridge