这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions bootstrap.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env sh

set -e
#!/usr/bin/env bash
set -eo pipefail
export DEBIAN_FRONTEND=noninteractive
export DOKKU_REPO=${DOKKU_REPO:-"https://github.com/progrium/dokku.git"}

Expand All @@ -18,5 +17,5 @@ cd dokku && test $DOKKU_BRANCH && git checkout origin/$DOKKU_BRANCH || true
make install

echo
echo "Be sure to upload a public key for your user:"
echo " cat ~/.ssh/id_rsa.pub | ssh root@$HOSTNAME \"gitreceive upload-key progrium\""
echo "Almost done! For next steps on configuration:"
echo " https://github.com/progrium/dokku#configuring"
7 changes: 1 addition & 6 deletions dokku
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env bash
set -e
set -o pipefail
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
export PLUGIN_PATH=${PLUGIN_PATH:="/var/lib/dokku/plugins"}
export DOKKU_ROOT=${DOKKU_ROOT:="/home/dokku"}

Expand All @@ -9,16 +8,12 @@ case "$1" in
APP="$2"; IMAGE="app/$APP"
echo "-----> Building $APP ..."
cat | dokku build $APP $IMAGE
echo "-----> Build complete!"
echo "-----> Releasing $APP ..."
dokku release $APP $IMAGE
echo "-----> Release complete!"
echo "-----> Deploying $APP ..."
dokku deploy $APP $IMAGE
echo "-----> Deploy complete!"
echo "-----> Cleaning up ..."
dokku cleanup
echo "-----> Cleanup complete!"
echo "=====> Application deployed:"
echo " $(dokku url $APP)"
echo
Expand Down
5 changes: 3 additions & 2 deletions plugins/00_dokku-standard/commands
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash
set -e; case "$1" in
#!/usr/bin/env bash
set -eo pipefail
case "$1" in
delete)
if [[ -z $2 ]]; then
echo "Please specify an app to delete"
Expand Down
3 changes: 2 additions & 1 deletion plugins/00_dokku-standard/install
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
#!/usr/bin/env bash
set -eo pipefail

sed -i 's/docker -d$/docker -d -r=true/' /etc/init/docker.conf

Expand Down
4 changes: 2 additions & 2 deletions plugins/00_dokku-standard/post-delete
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash
set -e
#!/usr/bin/env bash
set -eo pipefail
[[ -n $1 ]] && rm -r "$DOKKU_ROOT/$1" > /dev/null
4 changes: 2 additions & 2 deletions plugins/config/commands
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -e;
#!/usr/bin/env bash
set -eo pipefail

# Check if name is specified
if [[ $1 == config ]] || [[ $1 == config:* ]]; then
Expand Down
4 changes: 2 additions & 2 deletions plugins/git/commands
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -e;
#!/usr/bin/env bash
set -eo pipefail

case "$1" in
git-hook)
Expand Down
3 changes: 2 additions & 1 deletion plugins/nginx-vhosts/commands
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
#!/bin/bash
#!/usr/bin/env bash
set -eo pipefail
cat
3 changes: 2 additions & 1 deletion plugins/nginx-vhosts/install
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
#!/usr/bin/env bash
set -eo pipefail

# latest stable NGINX 1.4.x with websocket support
add-apt-repository -y ppa:nginx/stable
Expand Down
4 changes: 2 additions & 2 deletions plugins/nginx-vhosts/post-delete
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash
set -e
#!/usr/bin/env bash
set -eo pipefail
sudo /etc/init.d/nginx reload > /dev/null
4 changes: 2 additions & 2 deletions plugins/nginx-vhosts/post-deploy
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -e
#!/usr/bin/env bash
set -eo pipefail
APP="$1"; PORT="$2"
WILDCARD_SSL="$DOKKU_ROOT/ssl"
SSL="$DOKKU_ROOT/$APP/ssl"
Expand Down
4 changes: 2 additions & 2 deletions tests/run_ec2
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -e
#!/usr/bin/env bash
set -eo pipefail
KEYNAME="$1"
indent() { sed "s/^/ /"; }
echo "-----> Booting EC2 instance..."
Expand Down
3 changes: 2 additions & 1 deletion tests/run_vagrant
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
#!/usr/bin/env bash
set -eo pipefail
SELF=`which $0`
VAGRANT_SSH_PORT=${VAGRANT_SSH_PORT:-"2222"}
PUBLIC_KEY=${PUBLIC_KEY:-"$HOME/.ssh/id_rsa.pub"}
Expand Down
3 changes: 2 additions & 1 deletion tests/setup_travis
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
#!/usr/bin/env bash
set -eo pipefail
sed --in-place "s|access_key|access_key = $AWS_ACCESS_KEY|" .s3cfg
sed --in-place "s|secret_key|secret_key = $AWS_SECRET_KEY|" .s3cfg
s3cmd -c .s3cfg get s3://progrium-private/ec2_cert.pem /tmp/cert
Expand Down
4 changes: 2 additions & 2 deletions tests/test_deploy
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -e
#!/usr/bin/env bash
set -eo pipefail
SELF=`which $0`; APP="$1"; TARGET="$2"; FORWARDED_PORT="$3"
TMP=$(mktemp -d -t "$TARGET.XXXXX")
trap "rm -rf $TMP" EXIT
Expand Down