From 7b165d4f3bb0ee94eeaadd48c190a431d5b1f0c6 Mon Sep 17 00:00:00 2001 From: sbs20 Date: Sat, 1 May 2021 23:44:22 +0100 Subject: [PATCH 1/4] Version bump --- server/package-lock.json | 2 +- server/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/package-lock.json b/server/package-lock.json index 6f378440..d8195084 100644 --- a/server/package-lock.json +++ b/server/package-lock.json @@ -1,6 +1,6 @@ { "name": "scanservjs-server", - "version": "2.11.1", + "version": "2.11.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/server/package.json b/server/package.json index 754c8896..88841e92 100644 --- a/server/package.json +++ b/server/package.json @@ -1,6 +1,6 @@ { "name": "scanservjs-server", - "version": "2.11.1", + "version": "2.11.2", "description": "scanservjs is a simple web-based UI for SANE which allows you to share a scanner on a network without the need for drivers or complicated installation. scanserv does not do image conversion or manipulation (beyond the bare minimum necessary for the purposes of browser preview) or OCR.", "scripts": { "serve": "nodemon --exec 'vue-cli-service serve'", From ac3000948b9b54f8da875d734b8857a80600fa71 Mon Sep 17 00:00:00 2001 From: sbs20 Date: Sun, 2 May 2021 22:47:18 +0100 Subject: [PATCH 2/4] Resolve docker build issue #227 --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 32ef4c3b..aa960764 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Builder image. Alpine doesn't have python which is required by node-sass -FROM node:buster AS builder +FROM node:14-buster AS builder ENV APP_DIR=/app WORKDIR "$APP_DIR" @@ -20,7 +20,7 @@ RUN cd webui \ && npm run server-build # production image -FROM node:buster-slim +FROM node:14-buster-slim ENV APP_DIR=/app WORKDIR "$APP_DIR" RUN apt-get update \ From 8065bff9a5b0d4833e442bd83926e43e2a9c57b4 Mon Sep 17 00:00:00 2001 From: sbs20 Date: Sun, 2 May 2021 22:48:28 +0100 Subject: [PATCH 3/4] Avoid unnecessary filter processing #187 --- server/src/api.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/api.js b/server/src/api.js index ef69e156..d47a2025 100644 --- a/server/src/api.js +++ b/server/src/api.js @@ -85,7 +85,7 @@ class Api { if (source.exists()) { const buffer = source.toBuffer(); const cmds = [...Config.previewPipeline.commands]; - if (filters) { + if (filters && filters.length) { const params = Filters.build(filters, true); cmds.splice(0, 0, `convert - ${params} tif:-`); } From 510b9432cf0d99a0e9beaf370c3924e7ee2ad1bb Mon Sep 17 00:00:00 2001 From: sbs20 Date: Sun, 2 May 2021 22:53:24 +0100 Subject: [PATCH 4/4] dev notes --- docs/development.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/development.md b/docs/development.md index e4e05dd3..e029e0a5 100644 --- a/docs/development.md +++ b/docs/development.md @@ -54,7 +54,7 @@ sudo chmod 666 /var/run/docker.sock ``` Useful commands -```console +```sh # Build and run docker build -t scanservjs-image . docker rm --force scanservjs-container 2> /dev/null @@ -82,11 +82,15 @@ docker container restart scanservjs-container # Maintenance docker ps -a docker image prune +docker image rm -f $(docker image ls --filter dangling=true -q) + +# Danger +docker image rm -f $(docker image ls -a -q) ``` ## Mount map configuration files -``` +```sh docker run -d \ -p 8080:8080 \ -v `pwd`/var/:/app/config/ \