mirror of
https://github.com/dokku/dokku.git
synced 2025-12-29 00:25:08 +01:00
use config:set-norestart
This commit is contained in:
@@ -36,13 +36,8 @@ case "$1" in
|
||||
dockerfile)
|
||||
# extract first port from Dockerfile
|
||||
DOCKERFILE_PORT=$(grep EXPOSE Dockerfile | head -1 | awk '{ print $2 }')
|
||||
if [[ -n "$DOCKERFILE_PORT" ]];then
|
||||
if [[ -f "$DOKKU_ROOT/$APP/ENV" ]] && [[ "$(grep DOKKU_DOCKERFILE_PORT $DOKKU_ROOT/$APP/ENV) > /dev/null 2>&1; echo $?" == "0" ]];then
|
||||
sed -i -e "s:DOKKU_DOCKERFILE_PORT=.*:DOKKU_DOCKERFILE_PORT=$DOCKERFILE_PORT:g" "$DOKKU_ROOT/$APP/ENV"
|
||||
else
|
||||
echo "export DOKKU_DOCKERFILE_PORT=$DOCKERFILE_PORT" >> "$DOKKU_ROOT/$APP/ENV"
|
||||
fi
|
||||
fi
|
||||
[[ -n "$DOCKERFILE_PORT" ]] && dokku config:set-norestart $APP DOKKU_DOCKERFILE_PORT=$DOCKERFILE_PORT
|
||||
|
||||
# sticking with same pattern of building app image before pre-build for now.
|
||||
docker build -t "$IMAGE" .
|
||||
# buildstep pluginhooks don't necessarily make sense for dockerfiles. call the new breed!!!
|
||||
|
||||
Reference in New Issue
Block a user