diff --git a/Dockerfile b/Dockerfile index f72cd42..3b1a02a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/README.md b/README.md index 78b401d..c1a5d90 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Cron based download from s3 and database restore. `./build_push.sh [-p , --package ]` -`./build_push.sh -p 11.7-3.9` +`./build_push.sh -p 12.4-3.12` ### Package files diff --git a/action.sh b/action.sh index b6bfbfe..53bcf7c 100755 --- a/action.sh +++ b/action.sh @@ -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 /cache/${dump_file}" + printf '\n%s' " pg_restore --jobs $(grep -c ^processor /proc/cpuinfo) --schema $SCHEMA --no-owner -d /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 /cache/${dump_file}" + printf '\n%s' " pg_restore --jobs $(grep -c ^processor /proc/cpuinfo) --no-owner -d /cache/${dump_file}" pg_restore --jobs "$(grep -c ^processor /proc/cpuinfo)" --no-owner -d "${DATABASE_URL}" "/cache/${dump_file}" fi diff --git a/package/12.4-3.12.env b/package/12.4-3.12.env new file mode 100644 index 0000000..806b28e --- /dev/null +++ b/package/12.4-3.12.env @@ -0,0 +1,4 @@ +ALPINE_VERSION='3.12' +PG_LATEST=false +PG_BASE_VERSION='12' +PG_FULL_VERSION='12.4'