-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample_docker_run.sh
More file actions
executable file
·32 lines (29 loc) · 993 Bytes
/
example_docker_run.sh
File metadata and controls
executable file
·32 lines (29 loc) · 993 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
#!/bin/bash
CONTAINER_IMAGE="ghcr.io/looprock/rds_pg_anon:latest"
if [ ! -d "${HOME}/pg_anon/data" ]; then
mkdir -p "${HOME}/pg_anon/data"
fi
if [ ! -d "${HOME}/pg_anon/extend" ]; then
mkdir -p "${HOME}/pg_anon/extend"
fi
docker pull ${CONTAINER_IMAGE}
docker run \
-v ${HOME}/pg_anon/data:/app/data \
-v ${HOME}/pg_anon/extend:/app/extend \
-v ${HOME}/.aws:/root/.aws \
-e PGDATABASE=${PGDATABASE} \
-e PGPORT=${PGPORT} \
-e PGUSER=${PGUSER} \
-e PGANON_S3_BUCKET_NAME=${PGANON_S3_BUCKET_NAME} \
-e PGANON_ENVIRONMENT=${PGANON_ENVIRONMENT} \
-e PGANON_RDS_VPCSECURITYGROUPIDS=${PGANON_RDS_VPCSECURITYGROUPIDS} \
-e PGANON_RDS_DBSUBNETGROUPNAME=${PGANON_RDS_DBSUBNETGROUPNAME} \
-e PGANON_RDS_SOURCE_ID=${PGANON_RDS_SOURCE_ID} \
-e PGPASSWORD=${PGPASSWORD} \
-e PGANON_SAVE_DB=${PGANON_SAVE_DB} \
-e PGANON_SECRET_PROFILE=${PGANON_SECRET_PROFILE} \
-e PGANON_DATA_DIR="/app/data" \
-e PGANON_EXTEND_DIR="/app/extend" \
-e AWS_PROFILE=${AWS_PROFILE} \
${CONTAINER_IMAGE} \
--dry-run