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

Upgrade to Postgres 12.4 #2

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ ARG pg_version
# Install dependencies
#--------------------------------------------------------------------------------
# "postgresql" is required for "pg_restore"
# "python" is required for "aws-cli"
# "py-pip" is required for "aws-cli"
#--------------------------------------------------------------------------------
RUN echo "http://dl-cdn.alpinelinux.org/alpine/v${pg_alpine_branch}/main" >> /etc/apk/repositories

RUN apk --no-cache add dumb-init postgresql=${pg_version} python py-pip && \
RUN apk --no-cache --update add dumb-init postgresql=${pg_version} py-pip && \
pip install awscli && \
apk --purge -v del py-pip

Expand Down
24 changes: 10 additions & 14 deletions build_push.sh
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
#!/usr/bin/env sh

builds=$(echo '
9.6.10 9.6.10-r0 3.6
9.6 9.6.10-r0 3.6
9 9.6.10-r0 3.6
latest 9.6.10-r0 3.6
' | grep -v '^#' | tr -s ' ')
builds=\
"10.10_10.10-r0_3.8",\
"10_10.10-r0_3.8",\
"latest_10.10-r0_3.8"
abbotto marked this conversation as resolved.
Show resolved Hide resolved

# shellcheck disable=SC2039
IFS=$'\n'
for build in $builds; do
tag=$(echo "${build}" | cut -d ' ' -f 1 )
pg_version=$(echo "${build}" | cut -d ' ' -f 2)
pg_alpine_version=$(echo "${build}" | cut -d ' ' -f 3)
for build in $(echo $builds | tr ',' '\n'); do
tag=$(echo "${build}" | cut -d '_' -f 1 )
pg_version=$(echo "${build}" | cut -d '_' -f 2)
pg_alpine_branch=$(echo "${build}" | cut -d '_' -f 3)

echo docker build --tag bluedrop360/postgres-restore-from-s3:"${tag}" --build-arg pg_version="${pg_version}" --build-arg pg_alpine_branch="${pg_alpine_version}" .
eval docker build --tag bluedrop360/postgres-restore-from-s3:"${tag}" --build-arg pg_version="${pg_version}" --build-arg pg_alpine_branch="${pg_alpine_version}" .
echo docker build --tag bluedrop360/postgres-restore-from-s3:"${tag}" --build-arg pg_version="${pg_version}" --build-arg pg_alpine_branch="${pg_alpine_branch}" .
eval docker build --tag bluedrop360/postgres-restore-from-s3:"${tag}" --build-arg pg_version="${pg_version}" --build-arg pg_alpine_branch="${pg_alpine_branch}" .
echo docker push bluedrop360/postgres-restore-from-s3:"${tag}"
eval docker push bluedrop360/postgres-restore-from-s3:"${tag}"
done
6 changes: 3 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ version: '3'

services:
postgres-restore-from-s3:
image: postgres-restore-from-s3:9.6.10
image: postgres-restore-from-s3:10.10
network_mode: 'host'
build:
context: ./
dockerfile: ./Dockerfile
args:
pg_alpine_branch: '3.6'
pg_version: '9.6.10-r0'
pg_alpine_branch: '3.8'
pg_version: '10.10-r0'
environment:
AWS_BUCKET: <AWS_BUCKET_NAME>
AWS_REGION: <AWS_REGION_NAME>
Expand Down