Skip to content

Commit

Permalink
Docker mount ../logs only when created/needed
Browse files Browse the repository at this point in the history
Signed-off-by: Emo Abadjiev <emo@tumba.solutions>
  • Loading branch information
eabadjiev committed Jun 7, 2021
1 parent faab034 commit 1e934aa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion demo/run_demo
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ WEBHOOK_TARGET=""
if [ -z "$DOCKER_NET" ]; then
DOCKER_NET="bridge"
fi
DOCKER_VOL=""

for i in "$@"
do
Expand Down Expand Up @@ -82,6 +83,7 @@ do
echo "For example, to create the directory and then set the permissions use: 'mkdir ../logs; chmod uga+rws ../logs'"
exit 1
fi
DOCKER_VOL="${DOCKER_VOL} -v /$(pwd)/../logs:/home/indy/logs"
continue
;;
--bg)
Expand Down Expand Up @@ -243,6 +245,6 @@ DOCKER=${DOCKER:-docker}
$DOCKER run --name $AGENT --rm -it ${DOCKER_OPTS} \
--network=${DOCKER_NET} \
-p 0.0.0.0:$AGENT_PORT_RANGE:$AGENT_PORT_RANGE \
-v "/$(pwd)/../logs:/home/indy/logs" \
${DOCKER_VOL} \
$DOCKER_ENV \
faber-alice-demo $AGENT_MODULE --port $AGENT_PORT $ARGS

0 comments on commit 1e934aa

Please sign in to comment.