File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
infrastructure/ansible/playbooks/api/roles/api/tasks Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 1515 set_fact :
1616 prometheus_ip : " {{ lookup('env', 'prometheus_ip') }}"
1717
18- - name : print Prometheus IP
19- debug :
20- msg : ' Prometheus IP is {{ prometheus_ip }}'
21-
2218- name : Create new api docker container
2319 docker_container :
2420 name : ' {{ container_name }}'
4440 traefik.http.routers.api-metrics.rule : ' Host(`{{ api_domain }}`) && PathPrefix(`/api/metrics`)'
4541 traefik.http.routers.api-metrics.middlewares : metrics-whitelist
4642
43+ # Direct router for /api/metrics so prometheus can access it without Host header
44+ traefik.http.routers.api-metrics-direct.rule : ' PathPrefix(`/api/metrics`)'
45+ traefik.http.routers.api-metrics-direct.middlewares : ' metrics-whitelist'
46+ traefik.http.routers.api-metrics-direct.priority : ' 100'
47+
4748- name : Swap docker containers if new one is healthy
4849 block :
4950 - name : Check if api docker container is healthy
You can’t perform that action at this time.
0 commit comments