-
-
Save antonioaguilar/f6b145478f67808a3edd42530df7babc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2.2' | |
services: | |
awesome: | |
image: awesome | |
ports: | |
- 8080 | |
scale: 20 | |
networks: | |
- front-tier | |
- back-tier | |
lb: | |
image: dockercloud/haproxy | |
ports: | |
- 80:80 | |
links: | |
- awesome | |
networks: | |
- front-tier | |
- back-tier | |
volumes: | |
- /var/run/docker.sock:/var/run/docker.sock | |
networks: | |
front-tier: | |
driver: bridge | |
back-tier: | |
driver: bridge |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node | |
RUN mkdir -p /usr/src/app | |
COPY index.js /usr/src/app | |
EXPOSE 8080 | |
CMD [ "node", "/usr/src/app/index" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var http = require('http'); | |
var os = require('os'); | |
http.createServer(function (req, res) { | |
res.writeHead(200, { | |
'Content-Type': 'text/html' | |
}); | |
res.end(`<h1>I'm ${os.hostname()}</h1>`); | |
}).listen(8080); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment