-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
66 lines (63 loc) · 1.39 KB
/
docker-compose.yml
File metadata and controls
66 lines (63 loc) · 1.39 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
services:
redis:
image: redis:7-alpine
container_name: fraud-detection-redis
restart: unless-stopped
ports:
- 6379:6379
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
app:
build: .
container_name: fraud-detection-api
image: fraud-detection-api
restart: unless-stopped
ports:
- 8899:8899
env_file:
- .env
environment:
- DATA_TRAIN_END=10
- REDIS_HOST=redis
- REDIS_PORT=6379
- REDIS_DB=0
volumes:
- ./app:/app/app
- ./logs:/app/logs
- ./models:/app/models
- shared_files:/app/shared_files
working_dir: /app
command: uvicorn app.main:app --host 0.0.0.0 --port 8899 --reload
depends_on:
redis:
condition: service_healthy
worker:
build: .
container_name: fraud-detection-worker
image: fraud-detection-api
restart: unless-stopped
env_file:
- .env
environment:
- DATA_TRAIN_END=10
- REDIS_HOST=redis
- REDIS_PORT=6379
- REDIS_DB=0
volumes:
- ./app:/app/app
- ./logs:/app/logs
- ./models:/app/models
- shared_files:/app/shared_files
working_dir: /app
command: dramatiq app.queues.job_queue
depends_on:
redis:
condition: service_healthy
volumes:
redis_data:
shared_files: