-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose.yml
150 lines (138 loc) · 3.3 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
version: "3.3"
services:
nginx:
image: nginx:latest
ports:
- "80:8080"
volumes:
- ./nginx/nginx.conf:/etc/nginx/conf.d/nginx.conf
- react_build:/var/www/react
depends_on:
- frontend
- backend
restart: always
db:
image: postgres:latest
container_name: sql_db
volumes:
#- ./backend/data/db:/var/lib/postgresql/data
- postgres_data_dev:/var/lib/postgresql/data
environment:
- POSTGRES_DB=teami2022
- POSTGRES_USER=teami
- POSTGRES_PASSWORD=teami
ports:
- 5432:5432
#pgadmin:
#image: dpage/pgadmin4:latest
#restart: always
#environment:
#- PGADMIN_DEFAULT_PASSWORD=secret
#- PGADMIN_LISTEN_PORT=81
#ports:
# - 8010:81
#volumes:
# - pgadmin_data_dev:/var/lib/pgadmin
#depends_on:
# - db
#links:
# - "db:sql-server"
backend:
image: backend
container_name: django-back
build:
context: ./backend
command: >
bash -c "python manage.py migrate && python manage.py loaddata data.json && gunicorn teami.wsgi --bind 0.0.0.0:8000"
volumes:
- ./backend/:/backend/
ports:
- "8000:8000"
environment:
- POSTGRES_NAME=teami2022
- POSTGRES_USER=teami
- POSTGRES_PASSWORD=teami
depends_on:
- db
links:
- db:db
rabbitmq:
image: rabbitmq:3.7-management
container_name: 'rabbitmq'
ports:
- 5672:5672
- 15672:15672
expose:
- 5672
environment:
- RABBITMQ_DEFAULT_USER=guest
- RABBITMQ_DEFAULT_PASS=guest
depends_on:
- backend
tty: true
celery:
build:
context: ./backend
volumes:
- ./backend:/backend
entrypoint: "/bin/sh ./run-celery.sh"
environment:
- POSTGRES_NAME=teami2022
- POSTGRES_USER=teami
- POSTGRES_PASSWORD=teami
depends_on:
- db
- backend
tty: true
frontend:
image: frontend
build:
context: ./frontend
container_name: react
#command: [ "npm", "start" ]
stdin_open: true # react-script 3.4.1 부터 필요
#tty: true
#ports:
# - 3000:3000
volumes:
- ./frontend/src:/frontend/src
- /frontend/node_modules
# - ./frontend/node_modules/:/frontend/node_modules
- react_build:/frontend/build
environment:
# - CI=true
- CHOKIDAR_USEPOLLING=true
# - REACT_APP_BACKEND_URL=http://localhost:8000
prometheus:
image: prom/prometheus
container_name: prometheus
volumes:
- ./prometheus:/etc/prometheus/
command:
- "--config.file=/etc/prometheus/prometheus.yml"
ports:
- "9090:9090"
grafana:
image: grafana/grafana
ports:
- "3060:3000"
node-exporter:
image: prom/node-exporter
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /:/rootfs:ro
command:
- "--path.procfs=/host/proc"
- "--path.sysfs=/host/sys"
- --collector.filesystem.ignored-mount-points
- "^/(sys|proc|dev|host|etc|rootfs/var/lib/docker/containers|rootfs/var/lib/docker/overlay2|rootfs/run/docker/netns|rootfs/var/lib/docker/aufs)($$|/)"
ports:
- "9100:9100"
restart: always
volumes:
postgres_data_dev:
pgadmin_data_dev:
rabbitmq_data_dev:
react_build: