Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
nodefabric
nf-demo-app
Commits
def953f8
Commit
def953f8
authored
Jun 06, 2015
by
Andres Toomsalu
Browse files
Switching to apache-php demoapp version
parent
e8f6b04a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Dockerfile
View file @
def953f8
...
...
@@ -5,20 +5,15 @@ MAINTAINER OpenNode LLC <info@opennodecloud.com>
RUN
yum
install
-y
http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
# 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
EXPOSE
80
# start node with the index.js file of our hello-world application
CMD
["node", "index.js"]
ENTRYPOINT
["/usr/sbin/httpd"]
CMD
["-D", "FOREGROUND"]
nodefabric/nf-demo-app.service
View file @
def953f8
...
...
@@ -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
\
-e DEMOAPP_HELLOWORLD=\"$DEMOAPP_HELLOWORLD\"
\
-v $DEMOAPP_DATADIR:/var/
lib/nf-demo-app
\
-v $DEMOAPP_DATADIR:/var/
www/html
\
$DEMOAPP_IMAGE"
ExecStop=-/usr/bin/docker stop $DEMOAPP_INSTANCE
...
...
nodejs/index.js
deleted
100644 → 0
View file @
e8f6b04a
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>
'
);
});
app
.
listen
(
80
);
console
.
log
(
'
Running on http://localhost
'
);
nodejs/package.json
deleted
100644 → 0
View file @
e8f6b04a
{
"name"
:
"nodefabric-hello-world"
,
"private"
:
true
,
"version"
:
"0.0.1"
,
"description"
:
"Node.js Hello world app on NodeFabric"
,
"author"
:
"opennodecloud.com"
,
"dependencies"
:
{
"express"
:
"4.12.0"
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment