dk: support de .compose.env pour le nom du projet
This commit is contained in:
parent
9d991e2d43
commit
4f7cb900d2
13
dk
13
dk
|
@ -80,9 +80,20 @@ function compose_set_env_args() {
|
||||||
if [ -f docker-compose.override.yml ]; then
|
if [ -f docker-compose.override.yml ]; then
|
||||||
replace_env_args+=(-f docker-compose.override.yml)
|
replace_env_args+=(-f docker-compose.override.yml)
|
||||||
fi
|
fi
|
||||||
if [ -n "$profile" -a -f "docker-compose.$profile.yml" ]; then
|
local PROJECT_NAME=--none--
|
||||||
|
[ -f .compose.env ] && source ./.compose.env
|
||||||
|
if [ -n "$profile" ]; then
|
||||||
|
if [ -f "docker-compose.$profile.yml" ]; then
|
||||||
replace_env_args+=(-f "docker-compose.$profile.yml")
|
replace_env_args+=(-f "docker-compose.$profile.yml")
|
||||||
fi
|
fi
|
||||||
|
if [ "$PROJECT_NAME" != --none-- ]; then
|
||||||
|
if [ -z "$COMPOSE_PROJECT_NAME" ]; then
|
||||||
|
[ -n "$PROJECT_NAME" ] || PROJECT_NAME="$(basename -- "$(pwd)")"
|
||||||
|
COMPOSE_PROJECT_NAME="${PROJECT_NAME}_${profile}"
|
||||||
|
fi
|
||||||
|
export COMPOSE_PROJECT_NAME
|
||||||
|
fi
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function initialize_build_env() {
|
function initialize_build_env() {
|
||||||
|
|
Loading…
Reference in New Issue