diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 93949d77..4d415f9b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -38,6 +38,7 @@ jobs: with: build-args: | PG_VERSION=14.6 + PG_MAJOR_VERSION=14 VERSION=${{ steps.get-latest-tag.outputs.tag }} context: . file: ./Dockerfile @@ -52,6 +53,7 @@ jobs: with: build-args: | PG_VERSION=15.1 + PG_MAJOR_VERSION=15 VERSION=${{ steps.get-latest-tag.outputs.tag }} context: . file: ./Dockerfile diff --git a/Dockerfile b/Dockerfile index e7565cb8..59499758 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,5 @@ -ARG PG_VERSION=14.6 +ARG PG_VERSION=15.1 +ARG PG_MAJOR_VERSION=15 ARG VERSION=custom FROM golang:1.19 as flyutil @@ -20,6 +21,7 @@ FROM wrouesnel/postgres_exporter:latest AS postgres_exporter FROM postgres:${PG_VERSION} ENV PGDATA=/data/postgresql ARG VERSION +ARG PG_MAJOR_VERSION LABEL fly.app_role=postgres_cluster LABEL fly.version=${VERSION} @@ -27,7 +29,7 @@ LABEL fly.pg-version=${PG_VERSION} LABEL fly.pg-manager=repmgr RUN apt-get update && apt-get install --no-install-recommends -y \ - ca-certificates iproute2 postgresql-14-repmgr curl bash dnsutils vim procps jq pgbouncer \ + ca-certificates iproute2 postgresql-$PG_MAJOR_VERSION-repmgr curl bash dnsutils vim procps jq pgbouncer \ && apt autoremove -y COPY --from=0 /fly/bin/* /usr/local/bin