Compare commits
11 Commits
aabe9d10d1
..
v1.2
| Author | SHA1 | Date | |
|---|---|---|---|
| 48f386c312 | |||
| 5162e5a283 | |||
| 2e4178b56e | |||
| c01de4f3e9 | |||
| 65ca8dc55b | |||
| f31390a3d9 | |||
| ca1d56ba42 | |||
| e738213ea0 | |||
| 81c0b51748 | |||
| 0e8a3845b2 | |||
| ead72b089d |
+4
-1
@@ -72,6 +72,9 @@
|
|||||||
*.tgz binary
|
*.tgz binary
|
||||||
*.zip binary
|
*.zip binary
|
||||||
|
|
||||||
|
# Docker build files
|
||||||
|
Dockerfile text eol=lf
|
||||||
|
|
||||||
# Text files where line endings should be preserved
|
# Text files where line endings should be preserved
|
||||||
*.patch -text
|
*.patch -text
|
||||||
|
|
||||||
@@ -83,4 +86,4 @@
|
|||||||
.gitignore export-ignore
|
.gitignore export-ignore
|
||||||
.gitkeep export-ignore
|
.gitkeep export-ignore
|
||||||
.vscode export-ignore
|
.vscode export-ignore
|
||||||
.idea export-ignore
|
.idea export-ignore
|
||||||
|
|||||||
+4
-4
@@ -2,12 +2,12 @@
|
|||||||
/shelf/
|
/shelf/
|
||||||
/workspace.xml
|
/workspace.xml
|
||||||
# Rider ignored files
|
# Rider ignored files
|
||||||
/modules.xml
|
|
||||||
/contentModel.xml
|
|
||||||
/.idea.webdev.iml
|
|
||||||
/projectSettingsUpdater.xml
|
/projectSettingsUpdater.xml
|
||||||
|
/modules.xml
|
||||||
|
/.idea.livereload.iml
|
||||||
|
/contentModel.xml
|
||||||
# Datasource local storage ignored files
|
# Datasource local storage ignored files
|
||||||
/../../../../../../../../../:\Users\AsifB\Documents\RiderProjects\webdev\.idea\.idea.webdev.dir\.idea/dataSources/
|
/../../../../../../../../../:\Users\AsifB\Documents\RiderProjects\livereload\.idea\.idea.livereload.dir\.idea/dataSources/
|
||||||
/dataSources.local.xml
|
/dataSources.local.xml
|
||||||
# Editor-based HTTP Client requests
|
# Editor-based HTTP Client requests
|
||||||
/httpRequests/
|
/httpRequests/
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<component name="ProjectCodeStyleConfiguration">
|
||||||
|
<state>
|
||||||
|
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
|
||||||
|
</state>
|
||||||
|
</component>
|
||||||
Generated
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="ContentModelUserStore">
|
<component name="UserContentModel">
|
||||||
<attachedFolders />
|
<attachedFolders />
|
||||||
<explicitIncludes />
|
<explicitIncludes />
|
||||||
<explicitExcludes />
|
<explicitExcludes />
|
||||||
-7
@@ -1,7 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<module type="RIDER_MODULE" version="4">
|
|
||||||
<component name="NewModuleRootManager">
|
|
||||||
<content url="file://$MODULE_DIR$/../.." />
|
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
|
||||||
</component>
|
|
||||||
</module>
|
|
||||||
Vendored
-3
@@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"bookmarks": []
|
|
||||||
}
|
|
||||||
+13
-12
@@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
# allow dynamic build by specifying base image as build arg
|
# allow dynamic build by specifying base image as build arg
|
||||||
ARG NODE_TAG="15-alpine3.12"
|
ARG NODE_TAG="16.4.2-alpine3.14"
|
||||||
FROM node:${NODE_TAG}
|
FROM node:${NODE_TAG}
|
||||||
|
|
||||||
# change user id of node user
|
# change user id of node user
|
||||||
@@ -16,14 +16,12 @@ RUN deluser --remove-home node \
|
|||||||
RUN apk --update --no-cache add tzdata tini
|
RUN apk --update --no-cache add tzdata tini
|
||||||
|
|
||||||
# labels
|
# labels
|
||||||
LABEL maintainer="Asif Bacchus <asif@bacchus.cloud>"
|
LABEL org.opencontainers.image.authors="Asif Bacchus <asif@asifbacchus.dev>"
|
||||||
LABEL org.label-schema.cmd="docker run -d --name livereload -v /dir/to/watch:/var/watch -p 127.0.0.1:35729:35729 [-e ...] docker.asifbacchus.app/livereload/livereload:latest"
|
LABEL org.opencontainers.image.title="livereload npm"
|
||||||
LABEL org.label-schema.description="Dockerized livereload npm running under (limited) node user. Environment variables allow specifying files to watch/exclude and notification delay."
|
LABEL org.opencontainers.image.description="Dockerized npm livereload running under limited user account. Environment variables allow specifying files to watch/exclude and notification delay."
|
||||||
LABEL org.label-schema.name="livereload"
|
LABEL org.opencontainers.image.url="https://git.asifbacchus.dev/ab-docker/livereload"
|
||||||
LABEL org.label-schema.schema-version="1.0"
|
LABEL org.opencontainers.image.documentation="https://git.asifbacchus.dev/ab-docker/livereload/raw/branch/master/README.md"
|
||||||
LABEL org.label-schema.url="https://git.asifbacchus.app/ab-docker/webdev"
|
LABEL org.opencontainers.image.source="https://git.asifbacchus.dev/ab-docker/livereload.git"
|
||||||
LABEL org.label-schema.usage="https://git.asifbacchus.app/ab-docker/webdev/wiki"
|
|
||||||
LABEL org.label-schema.vcs-url="https://git.asifbacchus.app/ab-docker/webdev.git"
|
|
||||||
|
|
||||||
# create default volume in case user forgets to map one
|
# create default volume in case user forgets to map one
|
||||||
VOLUME [ "/var/watch" ]
|
VOLUME [ "/var/watch" ]
|
||||||
@@ -52,6 +50,9 @@ CMD livereload /var/watch --debug --exts $EXT --exclusions $EXCLUDE -u true --wa
|
|||||||
|
|
||||||
# set build timestamp and version labels
|
# set build timestamp and version labels
|
||||||
ARG BUILD_DATE
|
ARG BUILD_DATE
|
||||||
LABEL org.label-schema.version="1.0"
|
LABEL org.opencontainers.image.version="16.4.2"
|
||||||
LABEL org.label-schema.build-date=${BUILD_DATE}
|
LABEL org.opencontainers.image.vendor="nodeJS"
|
||||||
#EOF
|
LABEL dev.asifbacchus.image.name="livereload npm"
|
||||||
|
LABEL dev.asifbacchus.image.version="1.2"
|
||||||
|
LABEL org.opencontainers.image.created=${BUILD_DATE}
|
||||||
|
#EOF
|
||||||
|
|||||||
@@ -17,11 +17,11 @@ Containerized implementation of [npm livereload](https://www.npmjs.com/package/l
|
|||||||
|
|
||||||
## Private docker repository
|
## Private docker repository
|
||||||
|
|
||||||
If you prefer, you can also use my private repository to download possibly newer containers and/or signed containers. I sign all major release tags (e.g. '1', '2', etc.) and 'latest.' Simply change `asifbacchus/livereload:tag` to `docker.asifbacchus.app/livereload/livereload:tag`.
|
If you prefer, you can also use my private repository to download possibly newer containers. Simply change `asifbacchus/livereload:tag` to `docker.asifbacchus.dev/livereload/livereload:tag`.
|
||||||
|
|
||||||
## Source/Issues
|
## Source/Issues
|
||||||
|
|
||||||
If you want the Dockerfile or if you want to bring an issue/request to my attention, please head to either my private [git server (preferred)](https://git.asifbacchus.app/ab-docker/webdev) or [github](https://github.com/asifbacchus/webdev).
|
If you want the Dockerfile or if you want to bring an issue/request to my attention, please head to either my private [git server (preferred)](https://git.asifbacchus.dev/ab-docker/livereload) or [github](https://github.com/asifbacchus/livereload).
|
||||||
|
|
||||||
## Environment variables
|
## Environment variables
|
||||||
|
|
||||||
@@ -41,7 +41,7 @@ Obviously, this container needs something to monitor to determine whether change
|
|||||||
## Example run commands
|
## Example run commands
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker run --name livereload --restart unless-stopped \
|
docker run -d --name livereload --restart unless-stopped \
|
||||||
-v /home/user/Documents/myWebPage:/var/watch \
|
-v /home/user/Documents/myWebPage:/var/watch \
|
||||||
-p 35729:35729 \
|
-p 35729:35729 \
|
||||||
asifbacchus/livereload:latest
|
asifbacchus/livereload:latest
|
||||||
@@ -54,7 +54,7 @@ The above command will run the container with a name of *livereload*, restarting
|
|||||||
Say you want to only monitor html and css files and you want to ignore anything going on in your 'oldversion' folder. You can set environment variables as follows:
|
Say you want to only monitor html and css files and you want to ignore anything going on in your 'oldversion' folder. You can set environment variables as follows:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker run --name livereload --restart unless-stopped \
|
docker run -d --name livereload --restart unless-stopped \
|
||||||
-v /home/user/Documents/myWebPage:/var/watch \
|
-v /home/user/Documents/myWebPage:/var/watch \
|
||||||
-p 35729:35729 \
|
-p 35729:35729 \
|
||||||
-e EXT="html,css" \
|
-e EXT="html,css" \
|
||||||
@@ -65,7 +65,7 @@ docker run --name livereload --restart unless-stopped \
|
|||||||
If you wanted a longer polling period, run as follows:
|
If you wanted a longer polling period, run as follows:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker run --name livereload --restart unless-stopped \
|
docker run -d --name livereload --restart unless-stopped \
|
||||||
-v /home/user/Documents/myWebPage:/var/watch \
|
-v /home/user/Documents/myWebPage:/var/watch \
|
||||||
-p 35729:35729 \
|
-p 35729:35729 \
|
||||||
-e DELAY=3000 \
|
-e DELAY=3000 \
|
||||||
@@ -93,4 +93,4 @@ Obviously, you should change `/local/directory/to/watch` and `TZ=Region/Locality
|
|||||||
|
|
||||||
## Final thoughts
|
## Final thoughts
|
||||||
|
|
||||||
That's it. Hopefully this is useful for you and makes it easier to run a live-reload server without having to install node on your machine. As always, let me know if you have any issues/suggestions by filing an issue on either git repo.
|
That's it. Hopefully this is useful for you and makes it easier to run a live-reload server without having to install node on your machine. As always, let me know if you have any issues/suggestions by filing an issue on either git repo.
|
||||||
|
|||||||
Reference in New Issue
Block a user