Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
examples for a blog post
node_modules
.git
node_modules
code:
build: .
app:
image: quay.io/oddnetworks/alpine-nodejs:4.2.3
volumes_from:
- code
ports:
- "8080:3000"
working_dir: /app
command: /bin/ash -c "npm install --production && npm run start"
code:
build: .
app:
image: quay.io/oddnetworks/alpine-nodejs:4.2.2
volumes_from:
- code
ports:
- "8080:3000"
working_dir: /app
command: /bin/ash -c "npm install --production && npm run start"
FROM tianon/true
ADD . /app
VOLUME /app
var express = require('express');
var app = express();
app.get('/', function (req, res) {
res.send('I am running nodejs version: ' + process.versions.node );
});
app.listen(3000, function () {
console.log('Example app listening on port 3000!');
});
{
"name": "sample",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"start": "node /app/index.js"
},
"dependencies": {
"express": "^4.13.3"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment