issue #92: inserting environment file to docker instance

This commit is contained in:
alexanderbeletsky committed 2013-07-19 09:17:41 +03:00
1 parent 36c4f37ad6
commit eef39c30d3
3 files changed
+27 -3

No files matched your search

+12
View File
@@ -7,6 +7,9 @@ case "$1" in
echo "-----> Building $APP ..."
cat | dokku build $IMAGE
echo "-----> Build complete!"
echo "-----> Setting up ..."
dokku setup $APP $IMAGE
echo "-----> Setup complete!"
echo "-----> Deploying $APP ..."
dokku deploy $APP $IMAGE
echo "=====> Application deployed:"
@@ -25,6 +28,15 @@ case "$1" in
docker commit $id $IMAGE > /dev/null
;;
setup)
APP="$2"; IMAGE="$3"
if [[ -f "$HOME/$APP/ENV" ]]; then
id=$(cat "$HOME/$APP/ENV" | docker run -i -a stdin $IMAGE /bin/bash -c "cat > /app/.app-env")
test $(docker wait $id) -eq 0
docker commit $id $IMAGE > /dev/null
fi
;;
deploy)
APP="$2"; IMAGE="$3"
pluginhook pre-deploy $APP $IMAGE