Merge pull request #2206 from SkynetLabs/do-not-report-when-env-file-does-not-exist

do not report from dc when env file does not exist
This commit is contained in:
Ivaylo Novakov 2022-08-18 12:00:17 +02:00 committed by GitHub
commit c70bc4b953
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

4
dc
View File

@ -11,7 +11,9 @@
cwd="$(dirname -- "$0";)";
# get portal modules configuration from .env file (if defined more than once, the last one is used)
PORTAL_MODULES=$(grep -e "^PORTAL_MODULES=" ${cwd}/.env | tail -1 | sed "s/PORTAL_MODULES=//")
if [[ -f "${cwd}/.env" ]]; then
PORTAL_MODULES=$(grep -e "^PORTAL_MODULES=" ${cwd}/.env | tail -1 | sed "s/PORTAL_MODULES=//")
fi
# include base docker compose file
COMPOSE_FILES="-f ${cwd}/docker-compose.yml"