Skip to content

Commit

Permalink
fix: finish docker image with script
Browse files Browse the repository at this point in the history
  • Loading branch information
matmut7 committed Aug 1, 2023
1 parent 8e42c58 commit e438ba7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions s3-client/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,8 @@ RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2
./aws/install

USER 1001
WORKDIR /home/ubuntu

COPY dump-upload.sh .

CMD ["./dump-upload.sh"]
7 changes: 7 additions & 0 deletions s3-client/dump-upload.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

set -ex

pg_dump -v -Fc --no-owner --no-acl "$DATABASE_URL" |
gzip |
aws s3 cp - "${DESTINATION_PATH}/$(date +"%Y-%m-%dT%H:%M:%S%:z").psql.gz"

0 comments on commit e438ba7

Please sign in to comment.