-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yml
156 lines (143 loc) · 3.06 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
151
152
153
154
155
156
version: "3"
services:
prometheus:
image: prom/prometheus
volumes:
- ./prometheus/:/etc/prometheus/
- promet_store:/prometheus
command:
- "--config.file=/etc/prometheus/prometheus.yml"
ports:
- 9090:9090
networks:
- app-tier
depends_on:
- backend
node-exporter:
image: prom/node-exporter:latest
container_name: node_exporter
restart: unless-stopped
expose:
- 9100
ports:
- 9100:9100
networks:
- app-tier
cadvisor:
image: gcr.io/cadvisor/cadvisor:latest
container_name: cadvisor
ports:
- 8080:8080
volumes:
- /:/rootfs:ro
- /var/run:/var/run:rw
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
networks:
- app-tier
grafana:
image: grafana/grafana:8.5.5
ports:
- 3060:3000
networks:
- app-tier
depends_on:
- backend
- prometheus
volumes:
- grafana_store:/var/lib/grafana
ai:
build:
context: ./AI
dockerfile: Dockerfile
ports:
- "5001:5001"
networks:
- app-tier
backend: &python
container_name: backend
build:
context: ./backend
command: sh -c "gunicorn --bind 0:8000 config.wsgi:application --workers 3 --max-requests 100"
ports:
- 8000:8000
volumes:
- ./backend/:/backend/
- ./backend/static:/backend/static
expose:
- 8000
networks:
- app-tier
depends_on:
- redis
- rabbitmq
- celery
celery:
<<: *python
container_name: celery
command: "celery -A flower worker --loglevel=INFO"
ports: []
depends_on:
- rabbitmq
frontend:
container_name: frontend
build:
context: ./frontend
dockerfile: Dockerfile.prod
volumes:
- ./frontend/:/frontend
- build_folder:/frontend/dist
- ./frontend/node_modules/:/frontend/node_modules
tty: true
nginx:
container_name: nginx
restart: unless-stopped
build:
context: ./nginx
ports:
- "80:80"
- "443:443"
expose:
- 80
- 443
volumes:
- build_folder:/var/www/frontend
- ./certbot/conf:/etc/letsencrypt
- ./certbot/www:/var/www/certbot
- ./backend/static:/backend/static
depends_on:
- frontend
- backend
networks:
- app-tier
redis:
image: redis
ports:
- "6379:6379"
networks:
- app-tier
rabbitmq:
image: rabbitmq
ports:
- "5672:5672"
networks:
- app-tier
certbot: #certbot 컨테이너 추가
image: certbot/certbot
restart: unless-stopped
container_name: certbot
volumes:
- ./certbot/conf:/etc/letsencrypt #nginx컨테이너에 certbot컨테이너 연결
- ./certbot/www:/var/www/certbot
depends_on:
- nginx
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
networks:
app-tier:
driver: bridge #localhost : 172.17.0.1
volumes:
build_folder: null
promet_store:
external: true
grafana_store:
external: true