wrap container id checks and reading into common function that attempts new and old style container id files

aggregate log streams
This commit is contained in:
Michael Hobbs committed 2015-04-21 14:32:30 -07:00
1 parent 33f872183e
commit e27d0e6fa5
7 files changed
+80 -44

No files matched your search

+1 -9
View File
@@ -74,21 +74,13 @@ case "$1" in
PROC_NAME=${line%%=*}
PROC_COUNT=${line#*=}
CONTAINER_NUM=1
oldids=$(get_container_ids $APP)
while [[ $CONTAINER_NUM -le $PROC_COUNT ]];do
DOKKU_CONTAINER_ID_FILE="$DOKKU_ROOT/$APP/CONTAINER.$PROC_NAME.$CONTAINER_NUM"
DOKKU_IP_FILE="$DOKKU_ROOT/$APP/IP.$PROC_NAME.$CONTAINER_NUM"
DOKKU_PORT_FILE="$DOKKU_ROOT/$APP/PORT.$PROC_NAME.$CONTAINER_NUM"
# try old form even in case we're migrating dokku versions
if [[ -f "$DOKKU_CONTAINER_ID_FILE" ]]; then
oldids+=" "
oldids+=$(< "$DOKKU_CONTAINER_ID_FILE")
oldids+=" "
elif [[ -f "$DOKKU_ROOT/$APP/CONTAINER" ]]; then
oldids+=$(< "$DOKKU_ROOT/$APP/CONTAINER")
fi
# start the app
DOCKER_ARGS=$(: | pluginhook docker-args $APP deploy)
DOCKER_ARGS+=$(: | pluginhook docker-args-deploy $APP)