From 74ca901b90ad612cd973e5f10933ad8a3a05f34f Mon Sep 17 00:00:00 2001 From: Viv B Date: Tue, 25 Mar 2025 16:46:32 +1100 Subject: [PATCH 1/3] feat(postgres): postgres 17 client --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0ff8392..cf4f903 100644 --- a/Dockerfile +++ b/Dockerfile @@ -41,7 +41,7 @@ RUN for binary in /app/bin/*; do \ RUN git clone https://github.com/PlaceOS/models # Build a minimal docker image -FROM alpine:3.20 +FROM alpine:3.21 WORKDIR /app @@ -59,7 +59,7 @@ RUN apk add \ 'libcurl>=7.79.1-r0' \ openssh \ openssl \ - postgresql15-client + postgresql17-client # copy app COPY scripts /app/scripts From 316c15f87e5a8aad6ac3ca94bedec1368acdc325 Mon Sep 17 00:00:00 2001 From: Viv B Date: Tue, 25 Mar 2025 16:59:23 +1100 Subject: [PATCH 2/3] feat(ci): update postgres version branches on push to master --- .github/workflows/postgres-versions.yml | 35 +++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/postgres-versions.yml diff --git a/.github/workflows/postgres-versions.yml b/.github/workflows/postgres-versions.yml new file mode 100644 index 0000000..2fb42a3 --- /dev/null +++ b/.github/workflows/postgres-versions.yml @@ -0,0 +1,35 @@ +name: Update Postgres Version Branches +on: + push: + branches: + - master + +jobs: + update-postgres-versions: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + fetch-depth: 0 # Need full history for merging + + - name: Set up Git + run: | + git config user.name "GitHub Actions" + git config user.email "github-actions@github.com" + + - name: Merge master into postgresql-15 + run: | + git checkout postgresql-15 + git merge --no-ff master -m "Merge master into postgresql-15" + sed -i 's/apk add postgresql[0-9]*-client/apk add postgresql15-client/g' Dockerfile + git commit -am "Ensure postgresql15-client is maintained" || echo "No changes to commit" + git push origin postgresql-15 + + - name: Merge master into postgresql-16 + run: | + git checkout postgresql-16 + git merge --no-ff master -m "Merge master into postgresql-16" + sed -i 's/apk add postgresql[0-9]*-client/apk add postgresql16-client/g' Dockerfile + git commit -am "Ensure postgresql16-client is maintained" || echo "No changes to commit" + git push origin postgresql-16 From cc3c3a63f36257515bf1b92978c16b1973de5c67 Mon Sep 17 00:00:00 2001 From: "Viv B." Date: Thu, 27 Mar 2025 12:15:02 +1100 Subject: [PATCH 3/3] chore(readme): add postgres version details --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index bffd6e5..e538d4c 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,14 @@ A set of scripts for initialization of PlaceOS. +## Database Compatibility + +PostgreSQL 17 is recommended (and required by `placeos/init` image) + +PostgreSQL 15 & 16 compatible images are also available: `placeos/init_pg15`, `placeos/init_pg16` + +The PostgreSQL client version must match the PostgreSQL server's major version for backup tasks to function. + ## Usage The scripts are methods wrapped by a [sam.cr](https://github.com/imdrasil/sam.cr) interface. Most use named arguments which are used as [described here](https://github.com/imdrasil/sam.cr#tasks-with-arguments).