Files
computer-playbook/roles/svc-prx-openresty/files/Dockerfile
kevinveenbirkenbachandClaude Opus 4.8 3f1771c374 fix(openresty): retry lua-prometheus downloads on transient http errors
Bare wget -q exited 8 on raw.githubusercontent.com rate limits under the parallel CI fan-out, failing the image build and with it whole deploy jobs (kix, suitecrm, akaunting). Retry with backoff on 429/5xx and log the actual http status.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-09 17:30:36 +02:00

19 lines
893 B
Docker

ARG OPENRESTY_IMAGE
ARG OPENRESTY_VERSION
FROM ${OPENRESTY_IMAGE}:${OPENRESTY_VERSION}
ARG PROMETHEUS_ENABLED
ARG LUA_PROMETHEUS_URL_MAIN
ARG LUA_PROMETHEUS_URL_COUNTER
ARG LUA_PROMETHEUS_URL_KEYS
RUN case "${PROMETHEUS_ENABLED}" in \
true|True|TRUE|1|yes) \
apk add --no-cache wget \
&& mkdir -p /usr/local/openresty/lualib/resty \
&& wget -nv --tries=5 --waitretry=15 --retry-on-http-error=429,500,502,503,504 -O /usr/local/openresty/lualib/resty/prometheus.lua "$LUA_PROMETHEUS_URL_MAIN" \
&& wget -nv --tries=5 --waitretry=15 --retry-on-http-error=429,500,502,503,504 -O /usr/local/openresty/lualib/prometheus_resty_counter.lua "$LUA_PROMETHEUS_URL_COUNTER" \
&& wget -nv --tries=5 --waitretry=15 --retry-on-http-error=429,500,502,503,504 -O /usr/local/openresty/lualib/prometheus_keys.lua "$LUA_PROMETHEUS_URL_KEYS" \
;; \
esac