Initial commit
continuous-integration/drone Build is passing Details

This commit is contained in:
Lauri Võsandi 2022-08-09 12:03:03 +03:00
commit 4369988277
5 changed files with 30 additions and 0 deletions

2
.drone.yml Normal file
View File

@ -0,0 +1,2 @@
kind: template
load: docker.yaml

1
.env Normal file
View File

@ -0,0 +1 @@
MY_POD_NAME=foo

6
Dockerfile Normal file
View File

@ -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>"

14
app.js Normal file
View File

@ -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}/`);
});

7
docker-compose.yml Normal file
View File

@ -0,0 +1,7 @@
version: '3.7'
services:
app:
network_mode: host
env_file: .env
build:
context: .