Commit 9cb99e5c authored by Arthur Lutz's avatar Arthur Lutz

[Docker/deploy] add uwsgi stats and uwsgi-exporter sidecar

parent c633d033ee5b
Pipeline #57902 failed with stages
in 1 minute and 39 seconds
......@@ -4,6 +4,9 @@ COPY . /src/
RUN pip install -e /src
RUN pip install -r /src/docker/requirements.txt
RUN cp /src/docker/pyramid.ini.j2 /pyramid.ini.j2
# enable stats socket used by uwsgi prometheus exporter
RUN echo "memory-report = true" >> /etc/uwsgi/uwsgi.ini
RUN echo "stats = 127.0.0.1:8001" >> /etc/uwsgi/uwsgi.ini
USER cubicweb
ENV CW_INSTANCE=intranet
RUN docker-cubicweb-helper create-instance
......@@ -33,6 +33,9 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: intranet
annotations:
prometheus.io/scrape: true
prometheus.io/port: 9117
spec:
selector:
matchLabels:
......@@ -87,6 +90,13 @@ spec:
memory: 500Mi
limits:
memory: 500Mi
- name: uwsgi-prometheus
image: timonwong/uwsgi-exporter
args:
- '--stats.uri'
- 'http://localhost:8001'
ports:
- containerPort: 9117
- name: nginx
image: r.intra.logilab.fr/library/nginx
imagePullPolicy: Always
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment