-
Notifications
You must be signed in to change notification settings - Fork 147
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #59 from sbs20/staging
v2.0.0
- Loading branch information
Showing
58 changed files
with
16,750 additions
and
7,402 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,29 @@ | ||
# builder image | ||
FROM node:buster AS builder | ||
|
||
ENV APP_DIR=/app | ||
WORKDIR "$APP_DIR" | ||
|
||
# install build dependencies | ||
COPY package.json "$APP_DIR" | ||
COPY package*.json "$APP_DIR/" | ||
RUN npm install | ||
|
||
# run a gulp build | ||
COPY . "$APP_DIR" | ||
RUN npm run build | ||
RUN npm run server-build | ||
RUN npm run client-build | ||
|
||
# production image | ||
FROM node:buster-slim | ||
ENV APP_DIR=/app | ||
WORKDIR "$APP_DIR" | ||
# Install sane | ||
RUN apt-get update && apt-get install -yq sane sane-utils imagemagick | ||
RUN sed -i '/policy domain="coder" rights="none" pattern="PDF"/d' /etc/ImageMagick-6/policy.xml | ||
|
||
COPY --from=builder "$APP_DIR/build/scanservjs" "$APP_DIR/" | ||
RUN sed -i 's/policy domain="coder" rights="none" pattern="PDF"/policy domain="coder" rights="read | write" pattern="PDF"'/ /etc/ImageMagick-6/policy.xml | ||
COPY --from=builder "$APP_DIR/dist" "$APP_DIR/" | ||
|
||
# Install dependencies | ||
RUN npm install --production | ||
|
||
|
||
ENV NET_HOST="" | ||
|
||
# Copy built assets from builder image | ||
|
||
COPY entrypoint.sh /entrypoint.sh | ||
|
||
ENTRYPOINT [ "/entrypoint.sh" ] | ||
|
||
# Copy entry point | ||
COPY run.sh /run.sh | ||
RUN ["chmod", "+x", "/run.sh"] | ||
ENTRYPOINT [ "/run.sh" ] | ||
EXPOSE 8080 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,64 @@ | ||
# scanservjs | ||
scanservjs is a nodejs port of scanserv. It's 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. scanservjs does not do image conversion or | ||
manipulation (beyond the bare minimum necessary for the purposes of browser | ||
preview) or OCR. | ||
scanservjs is a simple web-based UI for your scanner. It allows you to share a | ||
scanner (using SANE) on a network without the need for drivers or complicated | ||
installation. It can save to TIF, JPG, PNG and PDF with varyings compression | ||
settings. It also allows for configurable output conversions through | ||
configuration. | ||
|
||
![screenshot](https://github.com/sbs20/scanservjs/raw/master/docs/screen0.png) | ||
|
||
Copyright 2016 [Sam Strachan](https://github.com/sbs20) | ||
Copyright 2016 [Sam Strachan](https://github.com/sbs20) | ||
|
||
# requirements | ||
* SANE | ||
* ImageMagick | ||
* nodejs | ||
## Requirements | ||
* SANE | ||
* ImageMagick | ||
* nodejs | ||
|
||
# installation notes | ||
For an easy docker-based install (assuming that SANE supports your scanner out-of-the-box on Debian): | ||
## Installation notes | ||
For an easy docker-based install (assuming that SANE supports your scanner | ||
out-of-the-box on Debian) use the following commands. Please note that by | ||
default, configuration and scanned images are stored within the container and | ||
will be lost if you recreate it. If you want to map your scanned images then | ||
specify the volume mapping option `-v /local/path/:/app/data/output/` | ||
|
||
```console | ||
$ docker build -t scanservjs . | ||
$ docker run -p 8080:8080 --restart unless-stopped --name scanservjs --privileged scanservjs | ||
docker pull sbs20/scanservjs:latest | ||
docker rm --force scanservjs-container 2> /dev/null | ||
docker run -d -p 8080:8080 --restart unless-stopped --name scanservjs-container --privileged sbs20/scanservjs:latest | ||
``` | ||
(`--privileged` is required for the container to access the host's devices, to allow it to talk to the scanner) | ||
(`--privileged` is required for the container to access the host's devices, to | ||
allow it to talk to the scanner) | ||
|
||
scanservjs will now be accessible from `http://your-computer's-ip-here:8080/` | ||
scanservjs will now be accessible from `http://$host:8080/` | ||
|
||
## manual installation | ||
* See the installation notes [here](docs/install.md) | ||
If you want to install the latest staging branch (this may contain newer code) | ||
|
||
# background | ||
This is yet another scanimage-web-front-end. Why? | ||
```console | ||
docker pull sbs20/scanservjs:staging | ||
docker rm --force scanservjs-container 2> /dev/null | ||
docker run -d -p 8080:8080 --restart unless-stopped --name scanservjs-container --privileged sbs20/scanservjs:staging | ||
``` | ||
|
||
More installation options: | ||
|
||
* I wanted a simple server which would simply scan an image with as little | ||
dependency on other software as possible. I already have Photoshop / GIMP | ||
I don't need a webapp to do that stuff | ||
* Desire for easier and cleaner set up and configuration | ||
* Separation of presentation and control logic with json-rpc | ||
* I just wanted to | ||
* Manual installation notes [here](docs/install.md) | ||
* [Development notes](docs/development.md) | ||
* [Configuring the scanner and SANE](docs/sane.md) | ||
|
||
# roadmap | ||
* ES2016 | ||
* Setup page (auto diagnostics) | ||
* Configuration page for debugging set up assisting new users | ||
* Multi-language support | ||
## Why? | ||
This is yet another scanimage-web-front-end. Why? It originally started as an | ||
adaptation of phpsane - just to make everything a bit newer, give it a refresh | ||
and make it work on minimal installations without imagemagick - that version is | ||
[still available](https://github.com/sbs20/scanserv) but is no longer | ||
maintained. Then, I just wanted to write in node, and it's been a labour of love | ||
ever since. | ||
|
||
# acknowledgements | ||
## Roadmap | ||
* Configuration page for debugging set up assisting new users | ||
* Multi-language support | ||
|
||
## Acknowledgements | ||
* This project owes a lot to [phpsane](http://sourceforge.net/projects/phpsane/) | ||
* In many respects phpsane is more powerful than this. Scanservjs does not | ||
support jpeg conversion or OCR. phpSANE, however, is also more brittle and | ||
somewhat dated in its implementation. | ||
|
||
# more about SANE | ||
|
||
## More about SANE | ||
* http://www.sane-project.org/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module.exports = { | ||
presets: [ | ||
'@vue/cli-plugin-babel/preset' | ||
] | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.