-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.dev.yml
75 lines (70 loc) · 1.53 KB
/
docker-compose.dev.yml
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
version: "3.9"
services:
frontend:
container_name: frontend
build:
context: ./frontend
dockerfile: Dockerfile
ports:
- "5173:5173"
volumes:
- ./frontend:/frontend
- /frontend/node_modules
tty: true
stdin_open: true
networks:
- gtd
backend:
container_name: backend
env_file:
- ./backend/.env
build:
context: ./backend
dockerfile: Dockerfile
volumes:
- ./backend:/backend
- ./backend/static:/backend/static
- ./backend/log:/var/log/backend
command: sh -c "python manage.py makemigrations && python manage.py migrate && python manage.py runserver 0.0.0.0:8000"
restart: on-failure
ports:
- "8000:8000"
expose:
- 8000
tty: true
networks:
- gtd
rabbitmq:
hostname: gtdhost
container_name: rabbitmq
image: rabbitmq:3-management
command: rabbitmq-server
restart: unless-stopped
env_file:
- ./backend/.env # Note: Referencing backend environment file
ports:
- "5672:5672"
- "15672:15672"
volumes:
- ./backend:/backend
depends_on:
- backend
networks:
- gtd
celery_worker:
container_name: celery_worker
restart: always
build:
context: ./backend
dockerfile: Dockerfile
command: "celery -A gtd.celery worker --loglevel=info --pool=gevent --concurrency=12"
depends_on:
- rabbitmq
- backend
volumes:
- ./backend:/backend
networks:
- gtd
networks:
gtd:
driver: bridge