-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
94 lines (87 loc) · 2.01 KB
/
docker-compose.yml
File metadata and controls
94 lines (87 loc) · 2.01 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
version: '3.8'
services:
backend:
build: ./backend
ports:
- "5000:5000"
volumes:
- ./backend/database:/app/database
environment:
- REDIS_HOST=redis
- CELERY_BROKER_URL=redis://redis:6379/2
- CELERY_RESULT_BACKEND=redis://redis:6379/3
- MAILHOG_HOST=mailhog
- FRONTEND_URL=http://frontend:5173
depends_on:
redis:
condition: service_healthy
mailhog:
condition: service_started
networks:
- app_network
celery_worker:
build: ./backend
command: celery -A app.celery worker --pool=solo --loglevel=info
environment:
- REDIS_HOST=redis
- REDIS_PORT=6379
- CELERY_BROKER_URL=redis://redis:6379/2
- CELERY_RESULT_BACKEND=redis://redis:6379/3
depends_on:
redis:
condition: service_healthy
backend:
condition: service_started
networks:
- app_network
celery_beat:
build: ./backend
command: celery -A app.celery beat --loglevel=info
depends_on:
redis:
condition: service_healthy
backend:
condition: service_started
environment:
- REDIS_HOST=redis
- REDIS_PORT=6379
- CELERY_BROKER_URL=redis://redis:6379/2
- CELERY_RESULT_BACKEND=redis://redis:6379/3
networks:
- app_network
frontend:
build: ./frontend
ports:
- "5173:5173"
depends_on:
- backend
volumes:
- ./frontend:/app
- /app/node_modules
environment:
- VITE_HOST=0.0.0.0
- VITE_BACKEND_URL=http://localhost:5000
networks:
- app_network
redis:
image: redis:alpine
ports:
- "6379:6379"
command: redis-server
networks:
- app_network
healthcheck:
test: ["CMD", "redis-server", "--test-memory", "1"]
interval: 5s
timeout: 3s
retries: 5
mailhog:
image: mailhog/mailhog
ports:
- "1025:1025" # SMTP server
- "8025:8025" # Web UI
networks:
- app_network
networks:
app_network:
driver: bridge