forked from 2023SB-TeamJ/2023SB-Team-J
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.dev.yml
88 lines (81 loc) · 1.79 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
76
77
78
79
80
81
82
83
84
85
86
87
88
version: "3.9"
# docker-compose -f docker-compose.dev.yml up
services:
frontend:
command: sh -c "npm install && npm start"
build:
context: ./frontend
dockerfile: Dockerfile
container_name: t4y-frontend
ports:
- "3000:3000"
volumes:
- ./frontend:/frontend
tty: true
database:
image: mysql:8.0
container_name: t4y-database
env_file:
- ./backend/.env
ports:
- 3306:3306
networks:
- t4y
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: t4y-backend
volumes:
- ./backend:/app # 컴파일시 자동으로 빌드 설정
restart: on-failure
ports:
- 8000:8000
expose:
- 8000
depends_on:
- database
environment:
- DB_HOST=t4y-database
- DB_NAME=mydatabase
- DB_USER=myuser
- DB_PASSWORD=mypassword
command: "python manage.py runserver 0.0.0.0:8000"
# command: "gunicorn backend_project.wsgi --preload --bind 0.0.0.0:8000 --timeout 240"
tty: true
networks:
- t4y
rabbitmq:
hostname: t4yhost
container_name: rabbitmq
image: rabbitmq:3-management
command: rabbitmq-server
restart: unless-stopped
env_file:
- backend/.env
ports:
- 5672:5672 # Default Port
- 15672:15672 # For UI
volumes:
- ./backend:/backend
depends_on:
- backend
networks:
- t4y
celery_worker:
container_name: celery_worker
restart: always
build:
context: ./backend
dockerfile: Dockerfile
command: "celery -A backend_project.celery worker --loglevel=info --pool=gevent --concurrency=12"
depends_on:
- rabbitmq
- backend
volumes:
- ./backend:/backend
networks:
- t4y
networks:
t4y:
driver: bridge