-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
102 lines (96 loc) · 2.25 KB
/
docker-compose.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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
version: "3"
services:
gd_frontend:
container_name: gd_frontend
restart: unless-stopped
build:
context: ./frontend
command: ["yarn", "start"]
ports:
- 3000:3000
volumes:
- ./frontend/:/frontend/
- ./frontend/node_modules/:/frontend/node_modules
environment:
- CI=true
- CHOKIDAR_USEPOLLING=true
- REACT_APP_BACKEND_URL=http://localhost:8000
tty: true
gd_backend:
build:
context: ./backend
args:
DJANGO_ALLOWED_HOSTS: "*"
DJANGO_SECRET_KEY: "*"
DJANGO_CORS_ORIGIN_WHITELIST: "*"
container_name: gd_backend
command: sh -c "/wait & python -m config.decode
&& python manage.py makemigrations gdiary
&& python manage.py migrate gdiary
&& python manage.py makemigrations text
&& python manage.py migrate text
&& python manage.py runserver 0.0.0.0:8000"
restart: on-failure
ports:
- 8000:8000
volumes:
- ./backend:/backend
networks:
- gd
depends_on:
- gd_mysql
gd_mysql:
image: mysql
command:
[
"mysqld",
"--lower_case_table_names=1",
"--character-set-server=utf8mb4",
"--collation-server=utf8mb4_unicode_ci",
"--init-connect='SET NAMES utf8'",
"--skip-character-set-client-handshake",
]
container_name: gd_mysql # 컨테이너 이름 설정
ports:
# 도커:로컬
- "3307:3306"
env_file:
- ./backend/.env
networks:
- gd
gd_rabbitmq:
hostname: localhost
container_name: gd_rabbitmq
image: rabbitmq:3-management
command: rabbitmq-server
restart: unless-stopped
environment:
- RABBITMQ_USER=guest
- RABBITMQ_PASSWORD=guest
ports:
- 5672:5672 # Default Port
- 15672:15672 # For UI
volumes:
- ./backend:/backend
networks:
- gd
depends_on:
- gd_backend
expose:
- "15672"
gd_celery:
container_name: gd_celery
build:
context: ./backend
restart: unless-stopped
depends_on:
- gd_backend
- gd_rabbitmq
volumes:
- ./backend:/backend
networks:
- gd
command: "celery -A config.celery worker --loglevel=info --pool=solo"
networks:
gd:
driver: bridge