Skip to content

Commit 7ac3a07

Browse files
committed
Put SQL backup script into the Docker image
1 parent 6eccac4 commit 7ac3a07

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

atcoder-problems-backend/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,7 @@ COPY --from=builder /app/target/release/delta_update /usr/bin/del
3737
COPY --from=builder /app/target/release/dump_json /usr/bin/dump_json
3838
COPY --from=builder /app/target/release/fix_invalid_submissions /usr/bin/fix_invalid_submissions
3939
COPY --from=builder /app/target/release/run_server /usr/bin/run_server
40+
41+
42+
RUN apt-get update && apt-get install -y awscli postgresql-client
43+
ADD ./scripts/sql-backup.sh /usr/bin/sql-backup.sh
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/sh
22

3-
psql ${DATABASE_URL} -c "\copy submissions TO './submissions.csv' WITH (FORMAT CSV, HEADER)"
3+
psql ${SQL_URL} -c "\copy submissions TO './submissions.csv' WITH (FORMAT CSV, HEADER)"
44
gzip submissions.csv
55
aws s3 cp submissions.csv.gz s3://kenkoooo/submissions.csv.gz --acl public-read

sql-backup/Dockerfile

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)