Skip to content
Snippets Groups Projects
Commit 27f80c18 authored by jurgenhaas's avatar jurgenhaas
Browse files

#139 Change into project directory before doing anything else, if...

#139 Change into project directory before doing anything else, if l3d gets called with an existing project ID

Also silence the copy command when existing config gets copied into l3drun
parent aa1a8650
No related branches found
No related tags found
1 merge request!37Merging develop into main
......@@ -78,6 +78,14 @@ if [[ "x${L3D_ALWAYS_CLEANUP}" == "x" ]]; then
L3D_ALWAYS_CLEANUP=0
fi
# Chenge directory to the existing project root, if available.
if [[ -n $1 ]]; then
ID=$(docker container ls --all -q -f name=^$1_l3d$)
if [[ -n ${ID} ]]; then
cd $(docker exec ${ID} php /usr/local/bin/volume.php --none)
fi
fi
# Read environment variables
if [[ -f "${HOME}/.env" ]]; then
export $(cat ${HOME}/.env | xargs) > /dev/null 2>&1
......@@ -88,7 +96,7 @@ fi
L3D_CONFIG=[]
if [[ -f ".lakedrops.yml" ]]; then
L3D_CONFIG=/tmp/${RANDOM}.lakedrops.yml
docker cp .lakedrops.yml l3drun:$L3D_CONFIG
docker cp .lakedrops.yml l3drun:$L3D_CONFIG >/dev/null 2>&1
fi
# Create project container parameters
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment