mirror of
https://github.com/Cian-H/iform-invenio.git
synced 2025-12-22 20:41:56 +00:00
15 lines
353 B
Bash
Executable File
15 lines
353 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
if [[ "$*" == *--dev* ]]; then
|
|
ENV_FILE="invenio_dev.env"
|
|
else
|
|
ENV_FILE="invenio.env"
|
|
fi
|
|
|
|
aws secretsmanager get-secret-value --secret-id Invenio | \
|
|
jq -r '.SecretString | fromjson | to_entries | .[] | .key + "=\"" + .value + "\""' > secrets.env
|
|
|
|
cat "$ENV_FILE" secrets.env > .env
|
|
|
|
echo "Environment set up using $ENV_FILE"
|