Skip to content
This repository has been archived by the owner on Aug 28, 2019. It is now read-only.

Commit

Permalink
Updated to comply with new demo workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
pcrespov committed Nov 28, 2017
1 parent baa97e5 commit 57d3643
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 5 deletions.
13 changes: 11 additions & 2 deletions demos/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# Demonstrations
# Demonstrators

- [frontend-react]
The purpose of this section is to keep a collection of small-size sample programs to support the review and testing carried out during the evaluation phase of the OSPARC project.

At this level:
- every folder contains a code sample that demonstrates a technology and/or a programming concept.
- contain some documentation (README.md and Review.md) that describes, explains and discusses the demo.
- every demo must be self-contained (i.e. within a docker) so it can be easily deployed
- can start a demo (or a part of it) with ```cd my-demo/ && make demo```

Other facts:
- Built images of some of these demos can be pulled from [itisfoundation@dockerhub](https://hub.docker.com/r/itisfoundation/sandbox/)
9 changes: 9 additions & 0 deletions demos/docker-node/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@


demo:
bash ./bin/build
bash ./bin/run

done:
docker stop demo_docker-node
docker rm demo_docker-node
2 changes: 2 additions & 0 deletions demos/docker-node/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Dockerized node-js

Veeeery basic way to create a docker.

## Setup
``` bash
cd docker-node
Expand Down
2 changes: 1 addition & 1 deletion demos/docker-node/bin/build
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

IMAGE_NAME=itis/nodejs
IMAGE_NAME=itisfoundation/sandbox:nodejs

# Build docker
docker build -t ${IMAGE_NAME} .
6 changes: 4 additions & 2 deletions demos/docker-node/bin/run
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

IMAGE_NAME=itis/nodejs
IMAGE_NAME=itisfoundation/sandbox:nodejs

# -u : runs the container using unprivileged user (by default, it runs as root)

Expand All @@ -11,5 +11,7 @@ docker run \
-w "/usr/src/app" \
-p 49160:8080 \
-d \
--name "mynodejs-app" \
--name "demo_docker-node" \
${IMAGE_NAME} "$@"

open http://localhost:49160

0 comments on commit 57d3643

Please sign in to comment.