Add docker-template
This commit is contained in:
10
si/docker-template/Dockerfile
Normal file
10
si/docker-template/Dockerfile
Normal file
@@ -0,0 +1,10 @@
|
||||
FROM node:12.18.1
|
||||
ENV NODE_ENV=production
|
||||
|
||||
COPY "src" "/app"
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN npm install --production
|
||||
|
||||
CMD [ "node", "app.js" ]
|
||||
11
si/docker-template/docker-compose.yml
Normal file
11
si/docker-template/docker-compose.yml
Normal file
@@ -0,0 +1,11 @@
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
node:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
container_name: docker-template
|
||||
restart: always
|
||||
ports:
|
||||
- 80:80
|
||||
1018
si/docker-template/package-lock.json
generated
Normal file
1018
si/docker-template/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
14
si/docker-template/package.json
Normal file
14
si/docker-template/package.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"name": "docker-template",
|
||||
"version": "1.0.0",
|
||||
"description": "## Úvod",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"express": "^4.18.2"
|
||||
}
|
||||
}
|
||||
9
si/docker-template/src/app.js
Normal file
9
si/docker-template/src/app.js
Normal file
@@ -0,0 +1,9 @@
|
||||
const express = require('express');
|
||||
const app = express();
|
||||
const port = 80;
|
||||
|
||||
app.use(express.static('public'));
|
||||
|
||||
app.listen(port, () => {
|
||||
console.log(`App listening on port ${port}`);
|
||||
})
|
||||
12
si/docker-template/src/public/index.html
Normal file
12
si/docker-template/src/public/index.html
Normal file
@@ -0,0 +1,12 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Jakub</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Jakub</h1>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user