Skip to content

Instantly share code, notes, and snippets.

@chiefy
Last active January 16, 2016 16:59
Show Gist options
  • Save chiefy/c914b3d8f94ce08a01b2 to your computer and use it in GitHub Desktop.
Save chiefy/c914b3d8f94ce08a01b2 to your computer and use it in GitHub Desktop.
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