Merge pull request #344 from plietar/commandfix
Fix commands, the easy way.
This commit is contained in:
16
README.md
16
README.md
@@ -55,6 +55,15 @@ You're done!
|
|||||||
Right now Buildstep supports buildpacks for Node.js, Ruby, Python, [and more](https://github.com/progrium/buildstep#supported-buildpacks). It's not hard to add more, [go add more](https://github.com/progrium/buildstep#adding-buildpacks)!
|
Right now Buildstep supports buildpacks for Node.js, Ruby, Python, [and more](https://github.com/progrium/buildstep#supported-buildpacks). It's not hard to add more, [go add more](https://github.com/progrium/buildstep#adding-buildpacks)!
|
||||||
Please check the documentation for your particular build pack as you may need to include configuration files (such as a Procfile) in your project root.
|
Please check the documentation for your particular build pack as you may need to include configuration files (such as a Procfile) in your project root.
|
||||||
|
|
||||||
|
## Remote commands
|
||||||
|
|
||||||
|
Dokku commands can be run over ssh. Anywhere you would run `dokku <command>`, just run `ssh -t dokku@progriumapp.com <command>`
|
||||||
|
The `-t` is used to request a pty. It is highly recommended to do so.
|
||||||
|
To avoid the need to type the `-t` option each time, simply create/modify a section in the `.ssh/config`, on the client side, as follows :
|
||||||
|
|
||||||
|
Host progriumapp.com
|
||||||
|
RequestTTY yes
|
||||||
|
|
||||||
## Run a command in the app environment
|
## Run a command in the app environment
|
||||||
|
|
||||||
It's possible to run commands in the environment of the deployed application:
|
It's possible to run commands in the environment of the deployed application:
|
||||||
@@ -119,13 +128,6 @@ eventually replace the Docker image for buildstep.
|
|||||||
|
|
||||||
You can use [Github Issues](https://github.com/progrium/dokku/issues), check [Troubleshooting](https://github.com/progrium/dokku/wiki/Troubleshooting) on the wiki, or join us on Freenode in #dokku
|
You can use [Github Issues](https://github.com/progrium/dokku/issues), check [Troubleshooting](https://github.com/progrium/dokku/wiki/Troubleshooting) on the wiki, or join us on Freenode in #dokku
|
||||||
|
|
||||||
## Known Issues
|
|
||||||
|
|
||||||
The issues are known and should be fixed soon :
|
|
||||||
|
|
||||||
* #236: "dokku run" cannot run interactive commands over ssh
|
|
||||||
* #272: Most commands hang at the end over ssh. CTRL-D is required to end them. As a workaround for now, run ssh using the `-t` flag.
|
|
||||||
|
|
||||||
## Components
|
## Components
|
||||||
|
|
||||||
* [Docker](https://github.com/dotcloud/docker) - Container runtime and manager
|
* [Docker](https://github.com/dotcloud/docker) - Container runtime and manager
|
||||||
|
|||||||
4
dokku
4
dokku
@@ -100,7 +100,9 @@ EOF
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
pluginhook commands "$@"
|
for script in $(ls -d /var/lib/dokku/plugins/*/commands); do
|
||||||
|
$script "$@"
|
||||||
|
done
|
||||||
;;
|
;;
|
||||||
|
|
||||||
esac
|
esac
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ case "$1" in
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
shift 2
|
shift 2
|
||||||
docker run -i -t -a stdout -a stderr $IMAGE /exec "$@"
|
docker run -i -t $IMAGE /exec "$@"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
url)
|
url)
|
||||||
@@ -84,4 +84,4 @@ EOF
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
esac
|
esac
|
||||||
cat
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ set -e; case "$1" in
|
|||||||
BACKUP_TMP_DIR=$(mktemp -d)
|
BACKUP_TMP_DIR=$(mktemp -d)
|
||||||
BACKUP_TMP_FILE="$BACKUP_TMP_DIR/backup.tar"
|
BACKUP_TMP_FILE="$BACKUP_TMP_DIR/backup.tar"
|
||||||
|
|
||||||
pluginhook backup-export 1 $BACKUP_DIR | tar -cf $BACKUP_TMP_FILE --files-from -
|
: | pluginhook backup-export 1 $BACKUP_DIR | tar -cf $BACKUP_TMP_FILE --files-from -
|
||||||
|
|
||||||
pushd $BACKUP_DIR > /dev/null
|
pushd $BACKUP_DIR > /dev/null
|
||||||
ls -d */ | grep -oE '[^/]+' > "$BACKUP_TMP_DIR/.dokku_backup_apps"
|
ls -d */ | grep -oE '[^/]+' > "$BACKUP_TMP_DIR/.dokku_backup_apps"
|
||||||
@@ -75,4 +75,4 @@ EOF
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
esac
|
esac
|
||||||
cat
|
|
||||||
|
|||||||
@@ -173,4 +173,4 @@ EOF
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
esac
|
esac
|
||||||
cat
|
|
||||||
|
|||||||
@@ -35,6 +35,8 @@ EOF
|
|||||||
git-shell -c "$args"
|
git-shell -c "$args"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
help)
|
||||||
|
cat
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
cat
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,2 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||||
cat
|
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ if [[ ! $(cat ~/.ssh/config 2>/dev/null | grep dokku.me) ]]; then
|
|||||||
touch ~/.ssh/config
|
touch ~/.ssh/config
|
||||||
echo "Host dokku.me" >> ~/.ssh/config
|
echo "Host dokku.me" >> ~/.ssh/config
|
||||||
echo " Port $VAGRANT_SSH_PORT" >> ~/.ssh/config
|
echo " Port $VAGRANT_SSH_PORT" >> ~/.ssh/config
|
||||||
|
echo " RequestTTY yes" >> ~/.ssh/config
|
||||||
fi
|
fi
|
||||||
echo "-----> Ensuring Vagrant is running..."
|
echo "-----> Ensuring Vagrant is running..."
|
||||||
cd "$(dirname $SELF)/.." && vagrant up | indent
|
cd "$(dirname $SELF)/.." && vagrant up | indent
|
||||||
|
|||||||
Reference in New Issue
Block a user