-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-entrypoint.sh
executable file
·16 lines (12 loc) · 1.15 KB
/
docker-entrypoint.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/env bash
set -e
PARAMETER_STORE_PREFIX=${PARAMETER_STORE_PREFIX:-}
if [ -n "$PARAMETER_STORE_PREFIX" ]; then
export DATABASE_USERNAME=$(aws ssm get-parameters --name /qiitan/stg/db_user --with-decryption --query "Parameters[0].Value" --region ap-northeast-1 --output text)
export DATABASE_PASSWORD=$(aws ssm get-parameters --name /qiitan/stg/db_password --with-decryption --query "Parameters[0].Value" --region ap-northeast-1 --output text)
export DATABASE_HOSTNAME=$(aws ssm get-parameters --name /qiitan/stg/db_host --with-decryption --query "Parameters[0].Value" --region ap-northeast-1 --output text)
export SECRET_KEY_BASE=$(aws ssm get-parameters --name /qiitan/stg/SECRET_KEY_BASE --with-decryption --query "Parameters[0].Value" --region ap-northeast-1 --output text)
export SENDGRID_USERNAME=$(aws ssm get-parameters --name /qiitan/stg/SENDGRID_USERNAME --with-decryption --query "Parameters[0].Value" --region ap-northeast-1 --output text)
export SENDGRID_PASSWORD=$(aws ssm get-parameters --name /qiitan/stg/SENDGRID_PASSWORD --with-decryption --query "Parameters[0].Value" --region ap-northeast-1 --output text)
fi
exec "$@"