File tree 4 files changed +33
-2
lines changed
compose/production/django
4 files changed +33
-2
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ RUN chmod +x /start-flower
47
47
RUN mkdir /app
48
48
RUN mkdir /app/staticfiles
49
49
RUN mkdir /app/mediafiles
50
+ RUN mkdir /app/flower_db
50
51
WORKDIR /app
51
52
52
53
# copy project code
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ until worker_ready; do
13
13
done
14
14
>&2 echo ' Celery workers is available'
15
15
16
- flower \
16
+ exec flower --persistent=1 --db=/app/flower_db/flower.db \
17
17
--app=django_celery_example \
18
18
--broker=" ${CELERY_BROKER} " \
19
19
--basic_auth=" ${CELERY_FLOWER_USER} :${CELERY_FLOWER_PASSWORD} "
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ services:
9
9
- mediafiles:/app/mediafiles
10
10
ports :
11
11
- 80:80
12
- - 5555 :5555
12
+ - 5559 :5555
13
13
- 15672:15672
14
14
depends_on :
15
15
- web
@@ -85,13 +85,36 @@ services:
85
85
volumes :
86
86
- staticfiles:/app/staticfiles
87
87
- mediafiles:/app/mediafiles
88
+ - flower_db:/app/flower_db
88
89
env_file :
89
90
- ./.env/.prod-sample
90
91
depends_on :
91
92
- redis
92
93
- db
93
94
95
+
96
+ prometheus :
97
+ image : prom/prometheus
98
+ ports :
99
+ - 9090:9090
100
+ command :
101
+ - --config.file=/etc/prometheus/prometheus.yml
102
+ volumes :
103
+ - ./prometheus.yml:/etc/prometheus/prometheus.yml:ro
104
+ depends_on :
105
+ - cadvisor
106
+
107
+ cadvisor :
108
+ image : google/cadvisor
109
+ container_name : cadvisor
110
+ volumes :
111
+ - /:/rootfs:ro
112
+ - /var/run:/var/run:rw
113
+ - /sys:/sys:ro
114
+ - /var/lib/docker/:/var/lib/docker:ro
115
+
94
116
volumes :
95
117
postgres_data :
96
118
staticfiles :
97
119
mediafiles :
120
+ flower_db :
Original file line number Diff line number Diff line change
1
+ scrape_configs :
2
+
3
+ - job_name : cadvisor
4
+ scrape_interval : 5s
5
+ static_configs :
6
+ - targets :
7
+ - cadvisor:8080
You can’t perform that action at this time.
0 commit comments