Commit def953f8 authored by Andres Toomsalu's avatar Andres Toomsalu
Browse files

Switching to apache-php demoapp version

parent e8f6b04a
......@@ -5,20 +5,15 @@ MAINTAINER OpenNode LLC <>
RUN yum install -y
# install pre-requisites
RUN yum install -y npm net-tools
RUN yum install -y httpd php php-mysql net-tools
RUN mkdir -p /var/www/html
# add health check script
ADD nf-demo-app-check /usr/bin/nf-demo-app-check
# make the nodejs src folder available in the docker image
ADD nodejs/ /srv/nodejs
WORKDIR /srv/nodejs
# install the dependencies from the package.json file
RUN npm install
# make port 80 available outside of the image
# start node with the index.js file of our hello-world application
CMD ["node", "index.js"]
ENTRYPOINT ["/usr/sbin/httpd"]
......@@ -16,7 +16,7 @@ docker run --name=$DEMOAPP_INSTANCE -h $HOSTNAME \
-p $DEMOAPP_BIND_ADDR:8010:80 \
-e SERVICE_80_CHECK_CMD=/usr/bin/nf-demo-app-check \
-v $DEMOAPP_DATADIR:/var/lib/nf-demo-app \
-v $DEMOAPP_DATADIR:/var/www/html \
ExecStop=-/usr/bin/docker stop $DEMOAPP_INSTANCE
var express = require('express');
var os = require("os");
var app = express();
var hostname = os.hostname();
app.get('/', function (req, res) {
res.send('<html><body>Hello from Node.js container ' + hostname + '</body></html>');
console.log('Running on http://localhost');
"name": "nodefabric-hello-world",
"private": true,
"version": "0.0.1",
"description": "Node.js Hello world app on NodeFabric",
"author": "",
"dependencies": {
"express": "4.12.0"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment