diff options
Diffstat (limited to 'compose/production/aws')
-rw-r--r-- | compose/production/aws/Dockerfile | 9 | ||||
-rw-r--r-- | compose/production/aws/maintenance/download | 23 | ||||
-rw-r--r-- | compose/production/aws/maintenance/upload | 29 |
3 files changed, 0 insertions, 61 deletions
diff --git a/compose/production/aws/Dockerfile b/compose/production/aws/Dockerfile deleted file mode 100644 index 36eea7f..0000000 --- a/compose/production/aws/Dockerfile +++ /dev/null @@ -1,9 +0,0 @@ -FROM docker.io/garland/aws-cli-docker:1.16.140 - -COPY ./compose/production/aws/maintenance /usr/local/bin/maintenance -COPY ./compose/production/postgres/maintenance/_sourced /usr/local/bin/maintenance/_sourced - -RUN chmod +x /usr/local/bin/maintenance/* - -RUN mv /usr/local/bin/maintenance/* /usr/local/bin \ - && rmdir /usr/local/bin/maintenance diff --git a/compose/production/aws/maintenance/download b/compose/production/aws/maintenance/download deleted file mode 100644 index 9561d91..0000000 --- a/compose/production/aws/maintenance/download +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh - -### Download a file from your Amazon S3 bucket to the postgres /backups folder -### -### Usage: -### $ docker compose -f production.yml run --rm awscli <1> - -set -o errexit -set -o pipefail -set -o nounset - -working_dir="$(dirname ${0})" -source "${working_dir}/_sourced/constants.sh" -source "${working_dir}/_sourced/messages.sh" - -export AWS_ACCESS_KEY_ID="${DJANGO_AWS_ACCESS_KEY_ID}" -export AWS_SECRET_ACCESS_KEY="${DJANGO_AWS_SECRET_ACCESS_KEY}" -export AWS_STORAGE_BUCKET_NAME="${DJANGO_AWS_STORAGE_BUCKET_NAME}" - - -aws s3 cp s3://${AWS_STORAGE_BUCKET_NAME}${BACKUP_DIR_PATH}/${1} ${BACKUP_DIR_PATH}/${1} - -message_success "Finished downloading ${1}." diff --git a/compose/production/aws/maintenance/upload b/compose/production/aws/maintenance/upload deleted file mode 100644 index 73c1b9b..0000000 --- a/compose/production/aws/maintenance/upload +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh - -### Upload the /backups folder to Amazon S3 -### -### Usage: -### $ docker compose -f production.yml run --rm awscli upload - -set -o errexit -set -o pipefail -set -o nounset - -working_dir="$(dirname ${0})" -source "${working_dir}/_sourced/constants.sh" -source "${working_dir}/_sourced/messages.sh" - -export AWS_ACCESS_KEY_ID="${DJANGO_AWS_ACCESS_KEY_ID}" -export AWS_SECRET_ACCESS_KEY="${DJANGO_AWS_SECRET_ACCESS_KEY}" -export AWS_STORAGE_BUCKET_NAME="${DJANGO_AWS_STORAGE_BUCKET_NAME}" - - -message_info "Upload the backups directory to S3 bucket {$AWS_STORAGE_BUCKET_NAME}" - -aws s3 cp ${BACKUP_DIR_PATH} s3://${AWS_STORAGE_BUCKET_NAME}${BACKUP_DIR_PATH} --recursive - -message_info "Cleaning the directory ${BACKUP_DIR_PATH}" - -rm -rf ${BACKUP_DIR_PATH}/* - -message_success "Finished uploading and cleaning." |