generated from jmertic/landscape-template
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
FROM node:16 | ||
|
||
WORKDIR /usr/src/app | ||
|
||
COPY . . | ||
|
||
EXPOSE 8001 | ||
|
||
CMD [ "node", "server.js" ] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
server: | ||
./server.js | ||
|
||
check-docker: | ||
docker info > /dev/null 2>&1 | ||
|
||
build-docker-image: check-docker | ||
docker build -t tazama/landscape . | ||
|
||
run-server-on-docker: build-docker-image | ||
docker run -ti --rm -p 8001:8001 tazama/landscape | ||
|
||
clean: | ||
docker rmi -f tazama/landscape |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/usr/bin/env node | ||
const req = require('https').request('https://raw.githubusercontent.com/cncf/landscapeapp/master/netlify/server.js', function(res) { | ||
process.on('SIGINT', function() { | ||
console.log("Caught interrupt signal. Exiting..."); | ||
process.exit(); | ||
}); | ||
let script = ''; | ||
res.on('data', (chunk) => script += chunk); | ||
res.on('end', () => eval(script)); | ||
}); | ||
req.end(); |