mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-12-27 04:51:14 +00:00
75b33e760a
Fix env vars. Rely on inheritance. Add a script to load env vars as above. Fix staging env Add nginx conf and SSL directory Reorganize .gitignore Use multi-staged docker-compose + dockerfile Substitute env vars for static values
18 lines
261 B
Bash
Executable file
18 lines
261 B
Bash
Executable file
#!/bin/bash
|
|
# use source script/env.sh
|
|
|
|
args=("$@")
|
|
|
|
if [[ $# -eq 1 ]]; then
|
|
args+=(.env)
|
|
fi
|
|
|
|
for FILE in "$@"
|
|
do
|
|
echo "Loading env vars from: $FILE"
|
|
ARGS=$(cat $FILE |grep -vE '^[[:space:]]*(#.*)*$')
|
|
|
|
export $(echo $ARGS|xargs)
|
|
echo "$ARGS\n"
|
|
done
|
|
|