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