mirror of
https://github.com/dokku/dokku.git
synced 2025-12-29 00:25:08 +01:00
[dockerfile] test new config stuff
This commit is contained in:
@@ -23,6 +23,10 @@
|
||||
"WEB_CONCURRENCY": {
|
||||
"description": "The number of processes to run.",
|
||||
"generator": "echo 5"
|
||||
},
|
||||
"FROM_APP_JSON": {
|
||||
"description": "The number of processes to run.",
|
||||
"value": "'foo\nbar'"
|
||||
}
|
||||
},
|
||||
"image": "gliderlabs/herokuish",
|
||||
|
||||
@@ -1,2 +1,18 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e; output="$(curl -s -S "$1")"; echo "$output"; test "$output" == "Hello World!"
|
||||
set -e;
|
||||
|
||||
test_url () {
|
||||
path="$1"
|
||||
expected_output="$2"
|
||||
url="$base_url$path"
|
||||
output="$(curl -s -S "$url:3000")"
|
||||
echo "$output"
|
||||
test "$output" == "$expected_output"
|
||||
}
|
||||
|
||||
base_url="$1"
|
||||
test_url / "Hello World!"
|
||||
test_url /env/FROM_APP_JSON "'foo
|
||||
bar'"
|
||||
test_url /env/HELLO "Hello
|
||||
'world' "
|
||||
@@ -8,6 +8,10 @@ app.get('/', function(request, response) {
|
||||
response.send('Hello World!')
|
||||
})
|
||||
|
||||
app.get('/env/:key', function(request, response) {
|
||||
response.send(process.env[request.params["key"]])
|
||||
})
|
||||
|
||||
app.listen(app.get('port'), function() {
|
||||
console.log("Node app is running at localhost:" + app.get('port'))
|
||||
})
|
||||
|
||||
9
tests/apps/dockerfile/post-deploy
Executable file
9
tests/apps/dockerfile/post-deploy
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
set -ex;
|
||||
|
||||
REMOTE=$1
|
||||
REPO=$2
|
||||
|
||||
GREETING=$(printf "Hello
|
||||
'world' " | base64)
|
||||
ssh "$REMOTE" config:set --encoded "$REPO" HELLO="$GREETING"
|
||||
Reference in New Issue
Block a user