Merge branch 'master' into 1091_mh-switch-to-herokuish
This commit is contained in:
@@ -189,6 +189,7 @@ Note: The following plugins have been supplied by our community and may not have
|
||||
| [Bower/Grunt](https://github.com/thrashr888/dokku-bower-grunt-build-plugin) | [thrashr888][] | |
|
||||
| [Bower/Gulp](https://github.com/gdi2290/dokku-bower-gulp-build-plugin) | [gdi2290][] | |
|
||||
| [Bower/Gulp](https://github.com/jagandecapri/dokku-bower-gulp-build-plugin) | [jagandecapri][] | |
|
||||
| [Docker auto volumes](https://github.com/Flink/dokku-docker-auto-volumes) | [Flink][] | 0.3.17+, auto-persist docker volumes |
|
||||
| [HipChat Notifications](https://github.com/cef/dokku-hipchat) | [cef][] | |
|
||||
| [Graphite/statsd](https://github.com/jlachowski/dokku-graphite-plugin) | [jlachowski][] | |
|
||||
| [Logspout](https://github.com/michaelshobbs/dokku-logspout) | [michaelshobbs][] | |
|
||||
|
||||
@@ -180,6 +180,8 @@ case "$1" in
|
||||
verify_app_name "$2"
|
||||
APP="$2";
|
||||
|
||||
[[ -f "$DOKKU_ROOT/$APP/ENV" ]] && source "$DOKKU_ROOT/$APP/ENV"
|
||||
|
||||
if [[ -s "$DOKKU_ROOT/$APP/URLS" ]]; then
|
||||
case "$1" in
|
||||
url)
|
||||
@@ -198,7 +200,7 @@ case "$1" in
|
||||
SCHEME="https"
|
||||
fi
|
||||
|
||||
if [[ -f "$DOKKU_ROOT/VHOST" ]]; then
|
||||
if [[ -f "$DOKKU_ROOT/VHOST" ]] && [[ "$NO_VHOST" != "1" ]]; then
|
||||
echo "$SCHEME://$(< "$DOKKU_ROOT/VHOST")"
|
||||
else
|
||||
for PORT_FILE in $DOKKU_ROOT/$APP/PORT.*; do
|
||||
|
||||
@@ -133,6 +133,10 @@ EOF
|
||||
dokku_log_info1 "VHOST support disabled, deleting $APP/VHOST"
|
||||
rm "$DOKKU_ROOT/$APP/VHOST"
|
||||
fi
|
||||
if [[ -f "$DOKKU_ROOT/$APP/URLS" ]]; then
|
||||
dokku_log_info1 "VHOST support disabled, deleting $APP/URLS"
|
||||
rm "$DOKKU_ROOT/$APP/URLS"
|
||||
fi
|
||||
if [[ -f "$DOKKU_ROOT/$APP/nginx.conf" ]]; then
|
||||
dokku_log_info1 "VHOST support disabled, deleting nginx.conf"
|
||||
rm "$DOKKU_ROOT/$APP/nginx.conf"
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
#!/usr/bin/env bats
|
||||
|
||||
# load test_helper
|
||||
|
||||
# setup() {
|
||||
# create_app
|
||||
# backup_file=$(mktemp /tmp/backup.XXXXXX)
|
||||
# rm $backup_file
|
||||
# }
|
||||
|
||||
# teardown() {
|
||||
# destroy_app
|
||||
# }
|
||||
|
||||
# @test "(backup) backup:export" {
|
||||
# run dokku backup:export $backup_file
|
||||
# echo "output: "$output
|
||||
# echo "status: "$status
|
||||
# assert_success
|
||||
# }
|
||||
@@ -13,6 +13,15 @@ teardown() {
|
||||
[[ -f "$DOKKU_ROOT/HOSTNAME.bak" ]] && mv "$DOKKU_ROOT/HOSTNAME.bak" "$DOKKU_ROOT/HOSTNAME"
|
||||
}
|
||||
|
||||
|
||||
check_urls() {
|
||||
local PATTERN="$1"
|
||||
run bash -c "dokku --quiet urls $TEST_APP | egrep \"${1}\""
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_success
|
||||
}
|
||||
|
||||
@test "(core) port exposure (with global VHOST)" {
|
||||
echo "dokku.me" > "$DOKKU_ROOT/VHOST"
|
||||
deploy_app
|
||||
@@ -21,17 +30,22 @@ teardown() {
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_failure
|
||||
|
||||
check_urls http://${TEST_APP}.dokku.me
|
||||
}
|
||||
|
||||
@test "(core) port exposure (without global VHOST and real HOSTNAME)" {
|
||||
rm "$DOKKU_ROOT/VHOST"
|
||||
echo "dokku.me" > "$DOKKU_ROOT/HOSTNAME"
|
||||
echo "${TEST_APP}.dokku.me" > "$DOKKU_ROOT/HOSTNAME"
|
||||
deploy_app
|
||||
CONTAINER_ID=$(< $DOKKU_ROOT/$TEST_APP/CONTAINER.web.1)
|
||||
run bash -c "docker port $CONTAINER_ID | sed 's/[0-9.]*://' | egrep -q '[0-9]*'"
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_success
|
||||
|
||||
HOSTNAME=$(< "$DOKKU_ROOT/HOSTNAME")
|
||||
check_urls http://${HOSTNAME}:[0-9]+
|
||||
}
|
||||
|
||||
@test "(core) port exposure (with NO_VHOST set)" {
|
||||
@@ -42,6 +56,9 @@ teardown() {
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_success
|
||||
|
||||
HOSTNAME=$(< "$DOKKU_ROOT/HOSTNAME")
|
||||
check_urls http://${HOSTNAME}:[0-9]+
|
||||
}
|
||||
|
||||
@test "(core) port exposure (without global VHOST and IPv4 address as HOSTNAME)" {
|
||||
@@ -53,6 +70,9 @@ teardown() {
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_success
|
||||
|
||||
HOSTNAME=$(< "$DOKKU_ROOT/HOSTNAME")
|
||||
check_urls http://${HOSTNAME}:[0-9]+
|
||||
}
|
||||
|
||||
@test "(core) port exposure (without global VHOST and IPv6 address as HOSTNAME)" {
|
||||
@@ -64,6 +84,9 @@ teardown() {
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_success
|
||||
|
||||
HOSTNAME=$(< "$DOKKU_ROOT/HOSTNAME")
|
||||
check_urls http://${HOSTNAME}:[0-9]+
|
||||
}
|
||||
|
||||
@test "(core) port exposure (pre-deploy domains:add)" {
|
||||
@@ -86,6 +109,8 @@ teardown() {
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_success
|
||||
|
||||
check_urls http://www.test.app.dokku.me
|
||||
}
|
||||
|
||||
@test "(core) port exposure (no global VHOST and domains:add post deploy)" {
|
||||
@@ -112,6 +137,8 @@ teardown() {
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_success
|
||||
|
||||
check_urls http://www.test.app.dokku.me
|
||||
}
|
||||
|
||||
@test "(core) dockerfile port exposure" {
|
||||
@@ -120,6 +147,8 @@ teardown() {
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_success
|
||||
|
||||
check_urls http://${TEST_APP}.dokku.me
|
||||
}
|
||||
|
||||
@test "(core) port exposure (xip.io style hostnames)" {
|
||||
@@ -130,4 +159,6 @@ teardown() {
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_success
|
||||
|
||||
check_urls http://my-cool-guy-test-app.127.0.0.1.xip.io
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user