Skip to content

Commit 5e3813e

Browse files
committed
build updates
1 parent eb25970 commit 5e3813e

File tree

4 files changed

+21
-20
lines changed

4 files changed

+21
-20
lines changed

.github/dependabot.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ updates:
33
- package-ecosystem: "pip"
44
directory: "/"
55
schedule:
6-
interval: "weekly"
6+
interval: weekly
77
- package-ecosystem: "github-actions"
88
directory: ".github/"
99
schedule:
10-
interval: "weekly"
10+
interval: weekly

.github/workflows/docker-image.yaml

+11-9
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,17 @@ jobs:
1818
packages: write
1919
steps:
2020
- name: Checkout
21-
uses: actions/checkout@v3
21+
uses: actions/checkout@v4
2222
- name: Login to GHCR
23-
if: github.event_name != 'pull_request'
24-
uses: docker/login-action@v2
23+
if: github.ref == 'refs/heads/master'
24+
uses: docker/login-action@v3
2525
with:
2626
registry: ghcr.io
2727
username: ${{ github.actor }}
2828
password: ${{ secrets.GITHUB_TOKEN }}
2929
- name: Docker meta
3030
id: meta
31-
uses: docker/metadata-action@v4
31+
uses: docker/metadata-action@v5
3232
with:
3333
# list of Docker images to use as base name for tags
3434
images: |
@@ -42,14 +42,16 @@ jobs:
4242
type=semver,pattern={{major}}.{{minor}}
4343
type=semver,pattern={{major}}
4444
type=sha
45-
#- name: Set up QEMU
46-
# uses: docker/setup-qemu-action@v2
4745
- name: Set up Docker Buildx
48-
uses: docker/setup-buildx-action@v2
46+
uses: docker/setup-buildx-action@v3
47+
- name: Set up QEMU
48+
uses: docker/setup-qemu-action@v3
4949
- name: Build and push
50-
uses: docker/build-push-action@v4
50+
uses: docker/build-push-action@v5
5151
with:
5252
context: .
53-
push: ${{ github.event_name != 'pull_request' }}
53+
provenance: false
54+
platforms: linux/amd64,linux/arm64
55+
push: ${{ github.ref == 'refs/heads/master' }}
5456
tags: ${{ steps.meta.outputs.tags }}
5557
labels: ${{ steps.meta.outputs.labels }}

Dockerfile

+5-9
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# TODO: use non root user
55

66
# The builder image, used to build the virtual environment
7-
FROM python:3.12-bookworm as builder
7+
FROM --platform=$BUILDPLATFORM python:3.12-bookworm as builder
88

99
ENV DEBIAN_FRONTEND=noninteractive \
1010
# python:
@@ -18,18 +18,16 @@ ENV DEBIAN_FRONTEND=noninteractive \
1818
PIP_DEFAULT_TIMEOUT=100 \
1919
PIP_ROOT_USER_ACTION=ignore \
2020
# poetry:
21-
POETRY_VERSION=1.8.2 \
21+
POETRY_VERSION=1.8.3 \
2222
POETRY_NO_INTERACTION=1 \
2323
POETRY_VIRTUALENVS_IN_PROJECT=1 \
2424
POETRY_VIRTUALENVS_CREATE=1 \
2525
POETRY_CACHE_DIR='/var/cache/pypoetry' \
2626
POETRY_HOME='/usr/local'
2727

28-
# POETRY_CACHE_DIR=/tmp/poetry_cache \
29-
3028
SHELL ["/bin/bash", "-eo", "pipefail", "-c"]
3129

32-
RUN pip install poetry==1.8.2
30+
RUN pip install poetry==${POETRY_VERSION}
3331

3432
WORKDIR /app
3533

@@ -38,7 +36,7 @@ COPY pyproject.toml poetry.lock README.md ./
3836
RUN poetry install --without dev --no-root && rm -rf $POETRY_CACHE_DIR
3937

4038
# The runtime image, used to just run the code provided its virtual environment
41-
FROM python:3.12-slim-bookworm as runtime
39+
FROM --platform=$BUILDPLATFORM python:3.12-slim-bookworm as runtime
4240

4341
# Needed for fixing permissions of files created by Docker:
4442
ARG UID=1000
@@ -57,8 +55,6 @@ ENV DEBIAN_FRONTEND=noninteractive \
5755
PIP_DISABLE_PIP_VERSION_CHECK=1 \
5856
PIP_DEFAULT_TIMEOUT=100 \
5957
PIP_ROOT_USER_ACTION=ignore \
60-
PYTHONDONTWRITEBYTECODE=1 \
61-
PYTHONUNBUFFERED=1 \
6258
# prometheus exporter:
6359
PROMETHEUS_DISABLE_CREATED_SERIES=true
6460

@@ -91,4 +87,4 @@ COPY --chown=exporter:exporter rds_metadata_exporter /app/rds_metadata_exporter
9187

9288
USER ${UID}
9389

94-
ENTRYPOINT ["python", "-m", "rds_metadata_exporter"]
90+
ENTRYPOINT ["tini", "--", "python", "-m", "rds_metadata_exporter"]

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
https://github.com/qonto/database-monitoring-framework
2+
https://github.com/mtanda/rds_enhanced_monitoring_exporter
3+
https://github.com/qonto/prometheus-rds-exporter/tree/main
4+
https://github.com/app-sre/aws-resource-exporter

0 commit comments

Comments
 (0)