Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use postgres alpine images to add support for PG 17 #61

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions .github/workflows/build-and-push-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@ jobs:
strategy:
matrix:
include:
- { postgres: 12, alpine: '3.12' }
- { postgres: 13, alpine: '3.14' }
- { postgres: 14, alpine: '3.16' }
- { postgres: 15, alpine: '3.17' }
- { postgres: 16, alpine: '3.19' }
- { postgres: 12 }
- { postgres: 13 }
- { postgres: 14 }
- { postgres: 15 }
- { postgres: 16 }
- { postgres: 17 }

steps:
- name: Checkout repository
Expand All @@ -40,7 +41,7 @@ jobs:
push: true
tags: ${{ github.repository }}:${{ matrix.postgres }}
build-args: |
ALPINE_VERSION=${{ matrix.alpine }}
POSTGRES_VERSION=${{ matrix.postgres }}
platforms: |
linux/amd64
linux/arm64
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG ALPINE_VERSION
FROM alpine:${ALPINE_VERSION}
ARG POSTGRES_VERSION
FROM postgres:${POSTGRES_VERSION}-alpine
ARG TARGETARCH

ADD src/install.sh install.sh
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ docker exec <container name> sh restore.sh <timestamp>

# Development
## Build the image locally
`ALPINE_VERSION` determines Postgres version compatibility. See [`build-and-push-images.yml`](.github/workflows/build-and-push-images.yml) for the latest mapping.
`POSTGRES_VERSION` determines Postgres version.
```sh
DOCKER_BUILDKIT=1 docker build --build-arg ALPINE_VERSION=3.14 .
DOCKER_BUILDKIT=1 docker build --build-arg POSTGRES_VERSION=17 .
```
## Run a simple test environment with Docker Compose
```sh
Expand Down
8 changes: 4 additions & 4 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ services:
build:
context: .
args:
ALPINE_VERSION: '3.16'
POSTGRES_VERSION: '17'
environment:
SCHEDULE: '@weekly' # optional
BACKUP_KEEP_DAYS: 7 # optional
PASSPHRASE: passphrase # optional
SCHEDULE: '@weekly' # optional
BACKUP_KEEP_DAYS: 7 # optional
PASSPHRASE: passphrase # optional
S3_REGION:
S3_ACCESS_KEY_ID:
S3_SECRET_ACCESS_KEY:
Expand Down