#63229 - setup docker

This commit is contained in:
Juraldinio
2025-01-28 01:46:11 +03:00
parent e606fe59d2
commit 81fcc39f12
8 changed files with 22 additions and 27 deletions
+5 -6
View File
@@ -5,19 +5,18 @@ FROM arm64v8/node:23.6.1-alpine3.21 AS builder
WORKDIR /usr/voka
COPY package.json .
COPY develop.sh .
RUN <<EOF
apk add --no-cache nginx;
npm install -g nodemon;
npm install -g lite-server;
npm install;
chmod +x develop.sh;
EOF
COPY configs/nginx.conf /etc/nginx/nginx.conf
#COPY vendors/videojs .
#RUN npm install phantomjs-prebuilt@2.1.16 --ignore-scripts && npm install
EXPOSE 8080
CMD ["nodemon", "server.js"]
#CMD ["nginx", "-g", "'daemon off;'"]
ENTRYPOINT ["/bin/sh"]
CMD ["./develop.sh"]
+6
View File
@@ -0,0 +1,6 @@
{
"port": 8080,
"server": {
"baseDir": "./demo"
}
}
-16
View File
@@ -1,16 +0,0 @@
events {}
http {
server {
listen 8080;
location / {
root /usr/voka/demo;
index index.html;
}
location /distribution {
root /usr/voka/distribution/;
}
}
}
+1
View File
@@ -5,6 +5,7 @@
<title>Title</title>
</head>
<body>
<h1>Hello world3</h1>
<div id="my-video"/>
<script language="JavaScript" src="./distribution/vokaPlayer.global.js"></script>
</body>
+7
View File
@@ -0,0 +1,7 @@
#!/bin/bash
# Start nodemon
nodemon --watch src -e ts --exec npm run build &
# Start lite-server
lite-server -c configs/lite-server-config.json
+1 -2
View File
@@ -1,6 +1,5 @@
import videojs from 'video.js';
// Initialize the Video.js player
const player = videojs('my-video', {
controls: true,
autoplay: false,
@@ -8,5 +7,5 @@ const player = videojs('my-video', {
});
player.ready(() => {
console.log('Your Video.js player is ready!');
console.log('Your Video.js player is ready?!!');
});
+1 -2
View File
@@ -17,7 +17,7 @@
// "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
"sourceMap": true, /* Generates corresponding '.map' file. */
// "outFile": "./", /* Concatenate and emit output to single file. */
"outDir": "./distribution/", /* Redirect output structure to the directory. */
"outDir": "./demo/distribution/", /* Redirect output structure to the directory. */
"rootDir": "./src/", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
"resolveJsonModule": true,
// "composite": true, /* Enable project compilation */
@@ -84,7 +84,6 @@
"exclude": [
"./node_modules/",
"./vendors/",
"./distribution/",
"./demo/"
]
}
+1 -1
View File
@@ -23,7 +23,7 @@ export default defineConfig((options) => {
vokaPlayer: 'src/main.ts'
},
format: ['iife'],
outDir: 'distribution',
outDir: 'demo/distribution',
dts: false,
splitting: false,
sourcemap: isDev,