Compare commits
No commits in common. "1194fc63c6debae794fd9d4161f3f13f41b5fd18" and "d26d8a822fe6e7e9074eec1dd2e39bb2ef34473d" have entirely different histories.
1194fc63c6
...
d26d8a822f
@ -21,10 +21,9 @@ EXPOSE 35729
|
|||||||
|
|
||||||
# add tini, timezone support and create certificate directories
|
# add tini, timezone support and create certificate directories
|
||||||
RUN apk --update --no-cache add \
|
RUN apk --update --no-cache add \
|
||||||
tini \
|
tini \
|
||||||
tzdata \
|
tzdata \
|
||||||
openssl \
|
openssl
|
||||||
&& apk --update --no-cache upgrade
|
|
||||||
|
|
||||||
# labels
|
# labels
|
||||||
LABEL org.opencontainers.image.authors="Asif Bacchus <asif@asifbacchus.dev>"
|
LABEL org.opencontainers.image.authors="Asif Bacchus <asif@asifbacchus.dev>"
|
||||||
@ -41,7 +40,7 @@ ENV PATH=/home/node/.npm-global/bin:$PATH
|
|||||||
ENV TZ="Etc/UTC"
|
ENV TZ="Etc/UTC"
|
||||||
ENV LR_PORT=35729
|
ENV LR_PORT=35729
|
||||||
ENV LR_EXTS="html,xml,css,js,jsx,ts,tsx,php,py"
|
ENV LR_EXTS="html,xml,css,js,jsx,ts,tsx,php,py"
|
||||||
ENV LR_EXCLUDE=".vscode/,.idea/,.tmp$,.swp$"
|
ENV LR_EXCLUDE=".git/,.svn/,.vscode/,.idea/"
|
||||||
ENV LR_DELAY=500
|
ENV LR_DELAY=500
|
||||||
ENV LR_DEBUG=true
|
ENV LR_DEBUG=true
|
||||||
ENV LR_HTTPS=true
|
ENV LR_HTTPS=true
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
// implement node-livereload over an HTTP or HTTPS connection
|
// implement node-livereload over an HTTPS connection
|
||||||
|
|
||||||
|
// healthcheck function
|
||||||
function healthcheck() {
|
function healthcheck() {
|
||||||
const express = require('express');
|
const express = require('express');
|
||||||
const http = require('http');
|
const http = require('http');
|
||||||
@ -22,21 +23,15 @@ function healthcheck() {
|
|||||||
hServer.listen(3000);
|
hServer.listen(3000);
|
||||||
}
|
}
|
||||||
|
|
||||||
// load modules
|
// load livereload module
|
||||||
const livereload = require('livereload');
|
const livereload = require('livereload');
|
||||||
const fs = require('fs');
|
|
||||||
|
|
||||||
// process from environment variable as array and convert elements to RegEx objects
|
|
||||||
const extraExclusions = process.env.LR_EXCLUDE.split(",");
|
|
||||||
extraExclusions.forEach((exclusion, idx) => {
|
|
||||||
extraExclusions[idx] = new RegExp(exclusion);
|
|
||||||
});
|
|
||||||
|
|
||||||
// set createServer options
|
// set createServer options
|
||||||
|
const fs = require('fs');
|
||||||
const options = {
|
const options = {
|
||||||
port: process.env.LR_PORT,
|
port: process.env.LR_PORT,
|
||||||
exts: process.env.LR_EXTS,
|
exts: process.env.LR_EXTS,
|
||||||
exclusions: extraExclusions,
|
exclusions: process.env.LR_EXCLUDE,
|
||||||
usePolling: true,
|
usePolling: true,
|
||||||
delay: process.env.LR_DELAY,
|
delay: process.env.LR_DELAY,
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user