simplify script and add more information
This commit is contained in:
parent
747bc1659a
commit
063f0b0b7b
12
dc
12
dc
|
@ -5,15 +5,13 @@
|
||||||
# would use docker-compose with the only difference being that you don't need to specify compose files. For more
|
# would use docker-compose with the only difference being that you don't need to specify compose files. For more
|
||||||
# information you can run `./dc` or `./dc help`.
|
# information you can run `./dc` or `./dc help`.
|
||||||
|
|
||||||
# get current working directory of this script
|
# get current working directory of this script and prefix all files with it to
|
||||||
|
# be able to call this script from anywhere and not only root directory of
|
||||||
|
# skynet-webportal project
|
||||||
cwd="$(dirname -- "$0";)";
|
cwd="$(dirname -- "$0";)";
|
||||||
|
|
||||||
if [ -f ${cwd}/.env ]; then
|
# get portal modules configuration from .env file (if defined more than once, the last one is used)
|
||||||
OLD_IFS=$IFS
|
PORTAL_MODULES=$(grep -e "^PORTAL_MODULES=" ${cwd}.env | tail -1 | sed "s/PORTAL_MODULES=//")
|
||||||
IFS=$'\n'
|
|
||||||
for x in $(grep -v '^#.*' ${cwd}/.env); do export $x; done
|
|
||||||
IFS=$OLD_IFS
|
|
||||||
fi
|
|
||||||
|
|
||||||
# include base docker compose file
|
# include base docker compose file
|
||||||
COMPOSE_FILES="-f ${cwd}/docker-compose.yml"
|
COMPOSE_FILES="-f ${cwd}/docker-compose.yml"
|
||||||
|
|
Reference in New Issue