Navigation Menu

Skip to content

Commit

Permalink
add test to endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
José Moreira committed Oct 9, 2015
1 parent 38508fe commit b114a79
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,7 @@
## 9-Out-2015

* Added `test` command which proxies to `npm test` on `/app` folder

## 8-Out-2015

* Added packages needed for some native modules
Expand Down
2 changes: 1 addition & 1 deletion LAUNCHER.README.md
Expand Up @@ -19,7 +19,7 @@ bash-3.2$ node.docker 0.12.7
> 0.12.7 is up and running from dockercache
(^C again to quit)
>
bash-3.2$ dnode 4.1.1
bash-3.2$ node.docker 4.1.1
Unable to find image 'cusspvz/node:4.1.1' locally
4.1.1: Pulling from cusspvz/node
9caf287e1f2d: Pull complete
Expand Down
3 changes: 2 additions & 1 deletion ONBUILD.README.md
Expand Up @@ -46,7 +46,8 @@ Under the hood, it executes the following commands:
* `CMD [ "start" ]` - I've put here an `entrypoint` that has the following
behaviors:
* ` ` - If nothing is supplied, it will just exec `node`
* `start` (Default) - proxies `npm start` so your app could run
* `start` (Default) - proxies `npm start` so your app could start
* `test` - proxies `npm test` so your app could run tests
* `shell` - proxies to `/bin/sh`

## What if i need to install stuff on my container?
Expand Down
6 changes: 6 additions & 0 deletions entrypoint
Expand Up @@ -13,6 +13,12 @@ if [ "$1" == "start" ]; then
exit $?
fi

if [ "$1" == "test" ]; then
cd /app
exec $NODE_PREFIX/bin/npm test
exit $?
fi

if [ "$1" == "shell" ] || \
[ "$1" == "sh" ] || \
[ "$1" == "bash" ] || \
Expand Down

0 comments on commit b114a79

Please sign in to comment.