Initial commit
continuous-integration/drone Build is passing
Details
continuous-integration/drone Build is passing
Details
This commit is contained in:
commit
4369988277
|
@ -0,0 +1,2 @@
|
||||||
|
kind: template
|
||||||
|
load: docker.yaml
|
|
@ -0,0 +1,6 @@
|
||||||
|
FROM node
|
||||||
|
ADD app.js /
|
||||||
|
CMD ["app.js"]
|
||||||
|
LABEL name="k-space/hello-node" \
|
||||||
|
version="rc" \
|
||||||
|
maintainer="Lauri Võsandi <lauri@k-space.ee>"
|
|
@ -0,0 +1,14 @@
|
||||||
|
const http = require('http');
|
||||||
|
|
||||||
|
const hostname = '0.0.0.0';
|
||||||
|
const port = 3000;
|
||||||
|
|
||||||
|
const server = http.createServer((req, res) => {
|
||||||
|
res.statusCode = 200;
|
||||||
|
res.setHeader('Content-Type', 'text/plain');
|
||||||
|
res.end('Hello ' + process.env.MY_POD_NAME);
|
||||||
|
});
|
||||||
|
|
||||||
|
server.listen(port, hostname, () => {
|
||||||
|
console.log(`Server running at http://${hostname}:${port}/`);
|
||||||
|
});
|
|
@ -0,0 +1,7 @@
|
||||||
|
version: '3.7'
|
||||||
|
services:
|
||||||
|
app:
|
||||||
|
network_mode: host
|
||||||
|
env_file: .env
|
||||||
|
build:
|
||||||
|
context: .
|
Loading…
Reference in New Issue