-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor, add healthz, efficiency and robustness
- Loading branch information
Showing
3 changed files
with
258 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,27 @@ | ||
FROM python:3-slim | ||
FROM python:3-alpine | ||
|
||
WORKDIR /app | ||
|
||
# Install build dependencies | ||
RUN apk add --no-cache --virtual .build-deps gcc musl-dev | ||
|
||
# Copy and install requirements | ||
COPY requirements.txt . | ||
RUN pip install --no-cache-dir -r requirements.txt | ||
|
||
# Remove build dependencies | ||
RUN apk del .build-deps | ||
|
||
# Copy the script | ||
COPY adguard_exporter.py . | ||
|
||
# Expose the metrics port | ||
EXPOSE 8000 | ||
|
||
# Set environment variables (can be overridden at runtime) | ||
ENV LOG_FILE_PATH=/adguard/work/data/querylog.json | ||
ENV METRICS_PORT=8000 | ||
ENV UPDATE_INTERVAL=10 | ||
|
||
# Run the exporter | ||
CMD ["python", "./adguard_exporter.py"] |
Oops, something went wrong.