Skip to content

Commit

Permalink
Use Postgres 12.4
Browse files Browse the repository at this point in the history
  • Loading branch information
abbotto committed Sep 15, 2020
1 parent 7b01d6f commit bcec7e9
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
6 changes: 1 addition & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,9 @@ ARG pg_full_version
# Install dependencies
#--------------------------------------------------------------------------------
# "postgresql" is required for "pg_restore"
# "py-pip" is required for "aws-cli"
#--------------------------------------------------------------------------------
RUN echo "http://dl-cdn.alpinelinux.org/alpine/v${alpine_version}/main" >> /etc/apk/repositories

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

#--------------------------------------------------------------------------------
# Set script permissions and create required directories
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Cron based download from s3 and database restore.

`./build_push.sh [-p <FILE>, --package <FILE>]`

`./build_push.sh -p 11.7-3.9`
`./build_push.sh -p 12.4-3.12`

### Package files

Expand Down
4 changes: 2 additions & 2 deletions action.sh
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,10 @@ if [ -n "$PRE_RESTORE_PSQL" ]; then
fi

if [ -n "$SCHEMA" ]; then
printf '%s' " pg_restore --jobs $(grep -c ^processor /proc/cpuinfo) --schema $SCHEMA --no-owner -d <DATABASE_URL> /cache/${dump_file}"
printf '\n%s' " pg_restore --jobs $(grep -c ^processor /proc/cpuinfo) --schema $SCHEMA --no-owner -d <DATABASE_URL> /cache/${dump_file}"
pg_restore --jobs "$(grep -c ^processor /proc/cpuinfo)" --schema "$SCHEMA" --no-owner -d "${DATABASE_URL}" "/cache/${dump_file}"
else
printf '%s' " pg_restore --jobs $(grep -c ^processor /proc/cpuinfo) --no-owner -d <DATABASE_URL> /cache/${dump_file}"
printf '\n%s' " pg_restore --jobs $(grep -c ^processor /proc/cpuinfo) --no-owner -d <DATABASE_URL> /cache/${dump_file}"
pg_restore --jobs "$(grep -c ^processor /proc/cpuinfo)" --no-owner -d "${DATABASE_URL}" "/cache/${dump_file}"
fi

Expand Down
4 changes: 4 additions & 0 deletions package/12.4-3.12.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
ALPINE_VERSION='3.12'
PG_LATEST=false
PG_BASE_VERSION='12'
PG_FULL_VERSION='12.4'

0 comments on commit bcec7e9

Please sign in to comment.