Pour tout problème contactez-nous par mail : support@froggit.fr | La FAQ :grey_question: | Rejoignez-nous sur le Chat :speech_balloon:

Skip to content
Snippets Groups Projects
Commit 13db1907 authored by peter_rabbit's avatar peter_rabbit
Browse files

fix:docker root public & config file prod

parent d060ddc6
No related branches found
No related tags found
No related merge requests found
Showing
with 13 additions and 1678 deletions
......@@ -11,4 +11,4 @@ WORKDIR /usr/share/nginx/html
COPY . .
RUN cp nginx.conf /etc/nginx/nginx.conf
\ No newline at end of file
# RUN cp nginx.conf /etc/nginx/nginx.conf
\ No newline at end of file
......@@ -5,7 +5,7 @@ run:
docker run -p 80:80 \
-it \
--name kuadrado \
--mount type=bind,source="$(shell pwd)",target=/usr/share/nginx/html \
--mount type=bind,source="$(shell pwd)/public",target=/usr/share/nginx/html \
-d kuadradoimg
start:
......
......@@ -2,6 +2,10 @@
"use strict";
const build_conf = {
protected_dirs: ["assets", "style"],
};
const fs = require("fs");
const browserify = require("browserify");
const curDir = process.cwd();
......@@ -22,7 +26,7 @@ function getPageHtml(pagename) {
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
<title>Kuadrado Software - ${pagename}</title>
<link rel="icon" type="image/svg+xml" href="/favicon.svg">
<link href="../../style/style.css" rel="stylesheet" />
<link href="/style/style.css" rel="stylesheet" />
</head>
<body>
<main></main>
......@@ -54,6 +58,7 @@ for (const p of pages) {
// If pages have been deleted in source, remove them in output directory too.
for (const dir of fs.readdirSync(`${curDir}/public`).filter(f => {
if (build_conf.protected_dirs.includes(f)) return false;
const stats = fs.statSync(`${curDir}/public/${f}`);
return stats.isDirectory();
})) {
......
......@@ -28,12 +28,10 @@ http {
include /etc/nginx/conf.d/*.conf;
server {
listen 80;
root /public;
location / {
root /public;
}
}
# server {
# location / {
# root /public;
# }
# }
}
This diff is collapsed.
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment