9 Commits

Author SHA1 Message Date
asif 41282ba070 chore(ide): update docker build config 2023-03-19 23:47:31 -06:00
asif 016f3be4bd refactor(node): resync package-lock.json 2023-03-19 23:45:45 -06:00
asif 29867aef13 refactor(node): update npm, and cmd-opts 2023-03-19 23:44:44 -06:00
asif cc8f0507f2 feature(node): bump express version to latest 2023-03-19 23:38:02 -06:00
asif 7406cb88b0 chore(ide): update docker build config 2023-03-19 23:09:06 -06:00
asif c2befd3d62 refactor(docker): bump node and alpine versions 2023-03-19 23:07:43 -06:00
asif 12ff81b91c feature(readme): update readme
- include monitoring multiple directories
2022-05-02 00:38:44 -06:00
asif 4b8e019b84 chore(ide): update docker build params 2022-05-02 00:38:16 -06:00
asif 6970776aa8 feature: watch 5 directories vs 1 2022-05-02 00:31:19 -06:00
7 changed files with 438 additions and 270 deletions
+5
View File
@@ -11,5 +11,10 @@
<option name="enabled" value="true" />
</CommitMessageValidationOverride>
</option>
<option name="commitMessageValidationEnabledOverride">
<BoolValueOverride>
<option name="enabled" value="true" />
</BoolValueOverride>
</option>
</component>
</project>
+8 -7
View File
@@ -1,21 +1,21 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="build/Dockerfile" type="docker-deploy" factoryName="dockerfile" server-name="Docker LOCAL">
<configuration default="false" name="build/Dockerfile" type="docker-deploy" factoryName="dockerfile" server-name="Docker (WSL)">
<deployment type="dockerfile">
<settings>
<option name="imageTag" value="docker.asifbacchus.dev/ab-livereload/ab-livereload:3.0.0" />
<option name="imageTag" value="docker.asifbacchus.dev/ab-livereload/ab-livereload:4.0.1" />
<option name="buildArgs">
<list>
<DockerEnvVarImpl>
<option name="name" value="INTERNAL_VERSION" />
<option name="value" value="3.0.0" />
<option name="name" value="BUILD_DATE" />
<option name="value" value="2023-03-19" />
</DockerEnvVarImpl>
<DockerEnvVarImpl>
<option name="name" value="GIT_COMMIT" />
<option name="value" value="dc732efdb7" />
<option name="value" value="016f3be4bd" />
</DockerEnvVarImpl>
<DockerEnvVarImpl>
<option name="name" value="BUILD_DATE" />
<option name="value" value="2022-02-26" />
<option name="name" value="INTERNAL_VERSION" />
<option name="value" value="4.0.1" />
</DockerEnvVarImpl>
</list>
</option>
@@ -23,6 +23,7 @@
<option name="sourceFilePath" value="build/Dockerfile" />
</settings>
</deployment>
<EXTENSION ID="com.jetbrains.rider.docker.debug" isFastModeEnabled="true" isPublishEnabled="true" />
<method v="2" />
</configuration>
</component>
+2
View File
@@ -72,6 +72,8 @@ If you are mounting existing certificates:
Obviously, this container needs something to monitor to determine whether changes have been made. This is accomplished via bind-mounting a directory from the host and is why 'polling' is necessary. Mount a directory with files to be monitored to */watch* in the container.
> Starting with v4.0.0 you can watch up to 5 directories! Simply mount them to `/watch`, `/watch2` ... `/watch5'.
## Commands
The containers entrypoint script recognizes a few commands that tell it what you want to do:
+4 -4
View File
@@ -1,8 +1,8 @@
# node-livereload server supporting SSL/TLS
# allow dynamic building by specifying base image elements as build-args
ARG NODE_VERSION=16
ARG ALPINE_VERSION=3.15
ARG NODE_VERSION=18
ARG ALPINE_VERSION=3.17
FROM node:${NODE_VERSION}-alpine${ALPINE_VERSION} as builder
ARG NODE_VERSION
ARG ALPINE_VERSION
@@ -10,7 +10,7 @@ ARG ALPINE_VERSION
# install node dependences
WORKDIR /build
COPY [ "package.json", "package-lock.json", "./" ]
RUN npm ci --production
RUN npm install -g npm@latest && npm ci --omit=dev
# final container
FROM alpine:${ALPINE_VERSION} as final
@@ -22,7 +22,7 @@ ARG NODE_UID=9999
ARG NODE_GID=9999
RUN addgroup -g ${NODE_GID} -S node \
&& adduser -G node -S -u ${NODE_UID} node \
&& mkdir /watch /certs \
&& mkdir /watch /watch2 /watch3 /watch4 /watch5 /certs \
&& chown root:node /certs \
&& chmod 770 /certs
+1 -1
View File
@@ -54,7 +54,7 @@ else {
// start LiveReload server
// noinspection JSVoidFunctionReturnValueUsed
const lrServer = livereload.createServer(lrOptions, healthCheck.start());
lrServer.watch('/watch');
lrServer.watch(['/watch', '/watch2', '/watch3', '/watch4', '/watch5']);
// graceful termination on signals
const termSignals = {
+417 -257
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -2,7 +2,7 @@
"name": "ab-livereload",
"version": "3.0.0",
"dependencies": {
"express": "^4.17.1",
"express": "^4.18.2",
"livereload": "^0.9.3"
}
}