Add docker-template

This commit is contained in:
Dzejkobik007
2023-03-26 23:39:38 +02:00
parent 3831fa1ae9
commit 2a38db72a1
6 changed files with 1074 additions and 0 deletions

View 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" ]

View 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

File diff suppressed because it is too large Load Diff

View 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"
}
}

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

View 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>