-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
175 lines (166 loc) · 3.87 KB
/
docker-compose.yml
File metadata and controls
175 lines (166 loc) · 3.87 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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
version: '3.8'
services:
# Frontend React App
frontend:
build:
context: ./finance-frontend
dockerfile: Dockerfile.dev
container_name: finance-frontend
ports:
- "3000:3000"
volumes:
- ./finance-frontend:/app
- /app/node_modules
environment:
- REACT_APP_API_URL=http://localhost:3001
- WATCHPACK_POLLING=true
- CHOKIDAR_USEPOLLING=true
depends_on:
- backend
networks:
- finance-app
stdin_open: true
tty: true
# Backend API
backend:
build:
context: .
dockerfile: backend/Dockerfile
container_name: finance-backend
ports:
- "3001:3001"
volumes:
- ./src:/app/src
- ./package.json:/app/package.json
- ./package-lock.json:/app/package-lock.json
- ./tsconfig.json:/app/tsconfig.json
- ./.env:/app/.env
- ./uploads:/app/uploads
- ./temp:/app/temp
- ./logs:/app/logs
environment:
- NODE_ENV=development
- PORT=3001
- JWT_SECRET=your-secret-key-change-this-in-production
- REDIS_HOST=redis
- REDIS_PORT=6379
- CLAMAV_HOST=clamav
- CLAMAV_PORT=3310
- VIRUS_SCAN_ENABLED=false
- LOG_LEVEL=info
- UPLOAD_DIR=/app/uploads
- TEMP_DIR=/app/temp
depends_on:
- redis
- postgres
networks:
- finance-app
# PostgreSQL Database
postgres:
image: postgres:15-alpine
container_name: finance-db
ports:
- "5433:5432"
environment:
- POSTGRES_DB=finance_db
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
networks:
- finance-app
# Redis for Bull queue and caching
redis:
image: redis:7-alpine
container_name: finance-redis
ports:
- "6379:6379"
volumes:
- redis_data:/data
command: redis-server --appendonly yes
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
networks:
- finance-app
# MinIO Object Storage
minio:
image: minio/minio:latest
container_name: finance-minio
ports:
- "9000:9000"
- "9001:9001"
environment:
- MINIO_ROOT_USER=minioadmin
- MINIO_ROOT_PASSWORD=minioadmin
volumes:
- minio_data:/data
command: server /data --console-address ":9001"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 10s
timeout: 5s
retries: 5
networks:
- finance-app
# Background worker for document processing
worker:
build:
context: .
dockerfile: backend/Dockerfile
container_name: finance-worker
command: npm run worker
environment:
- NODE_ENV=production
- REDIS_HOST=redis
- REDIS_PORT=6379
- CLAMAV_HOST=clamav
- CLAMAV_PORT=3310
- VIRUS_SCAN_ENABLED=false
- LOG_LEVEL=info
- UPLOAD_DIR=/app/uploads
- TEMP_DIR=/app/temp
- QUEUE_CONCURRENCY=3
volumes:
- ./uploads:/app/uploads
- ./temp:/app/temp
- ./logs:/app/logs
depends_on:
- redis
restart: unless-stopped
networks:
- finance-app
# Redis monitoring (optional - use with --profile monitoring)
redis-commander:
image: rediscommander/redis-commander:latest
hostname: redis-commander
container_name: finance-redis-commander
ports:
- "8081:8081"
environment:
- REDIS_HOSTS=local:redis:6379
depends_on:
- redis
restart: unless-stopped
networks:
- finance-app
profiles:
- monitoring
volumes:
postgres_data:
driver: local
redis_data:
driver: local
minio_data:
driver: local
networks:
finance-app:
driver: bridge