-
-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathrun_janitor.sh
More file actions
executable file
·38 lines (31 loc) · 958 Bytes
/
run_janitor.sh
File metadata and controls
executable file
·38 lines (31 loc) · 958 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/sh
# The directory it lives in.
script_directory="$(
cd "$(dirname "$0")" || exit
pwd
)"
cd "$script_directory" || exit
# However, in order to give Docker access to all the code we have to
# move up a level.
cd ..
./scripts/prepare_image.sh -i smasher
. ./scripts/common.sh
DB_HOST_IP=$(get_docker_db_ip_address)
AWS_ACCESS_KEY_ID="$(~/bin/aws configure get default.aws_access_key_id)"
export AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY="$(~/bin/aws configure get default.aws_secret_access_key)"
export AWS_SECRET_ACCESS_KEY
docker run \
--add-host=database:"$DB_HOST_IP" \
--entrypoint ./manage.py \
--env AWS_ACCESS_KEY_ID \
--env AWS_SECRET_ACCESS_KEY \
--env-file workers/environments/local \
--interactive \
--link drdb:postgres \
--memory 500m \
--platform linux/amd64 \
--tty \
--volume "$script_directory/volume":/home/user/data_store \
"$DOCKERHUB_REPO/dr_smasher" \
run_janitor