mirror of
https://github.com/vimagick/dockerfiles.git
synced 2024-11-24 08:52:15 +02:00
add barcode-server
This commit is contained in:
parent
16c8e752d3
commit
fb1914b0cf
@ -329,6 +329,7 @@ A collection of delicious docker recipes.
|
|||||||
- [x] actor-node-puppeteer-chrome
|
- [x] actor-node-puppeteer-chrome
|
||||||
- [x] archivebox/archivebox
|
- [x] archivebox/archivebox
|
||||||
- [x] docker.bintray.io/jfrog/artifactory-oss
|
- [x] docker.bintray.io/jfrog/artifactory-oss
|
||||||
|
- [x] markusressel/barcode-server
|
||||||
- [x] jeffail/benthos
|
- [x] jeffail/benthos
|
||||||
- [x] tutum/builder
|
- [x] tutum/builder
|
||||||
- [x] calendso/calendso
|
- [x] calendso/calendso
|
||||||
|
15
barcode-server/README.md
Normal file
15
barcode-server/README.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
barcode-server
|
||||||
|
==============
|
||||||
|
|
||||||
|
[barcode-server][1] is a simple daemon to read barcodes from USB Barcode
|
||||||
|
Scanners and expose them to other service using HTTP calls, a websocket API or
|
||||||
|
MQTT.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ mkdir -p data
|
||||||
|
$ wget -P data https://github.com/markusressel/barcode-server/raw/master/barcode_server.yaml
|
||||||
|
$ vim data/barcode_server.yaml
|
||||||
|
$ docker compose up -d
|
||||||
|
```
|
||||||
|
|
||||||
|
[1]: https://github.com/markusressel/barcode-server
|
63
barcode-server/data/barcode_server.yaml
Normal file
63
barcode-server/data/barcode_server.yaml
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
barcode_server:
|
||||||
|
|
||||||
|
# (optional) the verbosity level of log output
|
||||||
|
log_level: DEBUG
|
||||||
|
|
||||||
|
# (optional) an identifier for this barcode-server instance
|
||||||
|
# if omitted, this will be a UUIDv4
|
||||||
|
id: cash-register-1
|
||||||
|
|
||||||
|
# (optional) server configuration
|
||||||
|
server:
|
||||||
|
# (optional) the IP address to listen on for incoming connections
|
||||||
|
host: "0.0.0.0"
|
||||||
|
# (optional) the Port to listen on
|
||||||
|
port: 9654
|
||||||
|
# (optional) API-Token which has to be provided by connecting clients
|
||||||
|
api_token: "EmUSqjXGfnQwn5wn6CpzJRZgoazMTRbMNgH7CXwkQG7Ph7stex"
|
||||||
|
|
||||||
|
# (optional) Time period to retry delivering failed queued events before giving up and dropping the event
|
||||||
|
drop_event_queue_after: 2h
|
||||||
|
# (optional) Time to wait between retries
|
||||||
|
retry_interval: 2s
|
||||||
|
|
||||||
|
# (optional) HTTP push configuration
|
||||||
|
http:
|
||||||
|
# URL to send events to using a request
|
||||||
|
url: "http://dummy.restapiexample.com/api/v1/create"
|
||||||
|
# The request method to use
|
||||||
|
method: POST
|
||||||
|
# Headers to set on each request
|
||||||
|
headers:
|
||||||
|
- "X-Auth-Token: MY_HEADERS"
|
||||||
|
|
||||||
|
# (optional) MQTT push configuration
|
||||||
|
mqtt:
|
||||||
|
# MQTT server host address
|
||||||
|
host: "mqtt.mydomain.com"
|
||||||
|
# (optional) MQTT server port
|
||||||
|
port: 1883
|
||||||
|
# (optional) Client ID of this barcode-server instance to provide to the MQTT server
|
||||||
|
client_id: "barcode-server"
|
||||||
|
# MQTT topic to push events to
|
||||||
|
topic: "barcode-server/barcode"
|
||||||
|
# Username to use when connecting to the MQTT server
|
||||||
|
user: "myuser"
|
||||||
|
# Password to use when connecting to the MQTT server
|
||||||
|
password: "mypassword"
|
||||||
|
# (optional) QoS value of event messages
|
||||||
|
qos: 2
|
||||||
|
# (optional) Whether to instruct the MQTT server to remember event messages between restarts (of the MQTT server)
|
||||||
|
retain: True
|
||||||
|
|
||||||
|
# A list of regex patterns to match USB device names against
|
||||||
|
devices:
|
||||||
|
- ".*Barcode.*"
|
||||||
|
# A list of absolute file paths to devices
|
||||||
|
device_paths:
|
||||||
|
#- "/dev/input/barcode_scanner"
|
||||||
|
|
||||||
|
# (optional) Statistics configuration
|
||||||
|
stats:
|
||||||
|
# (optional) port to provide statistics on
|
||||||
|
port: 8000
|
16
barcode-server/docker-compose.yml
Normal file
16
barcode-server/docker-compose.yml
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
version: "3.8"
|
||||||
|
services:
|
||||||
|
barcode-server:
|
||||||
|
image: markusressel/barcode-server
|
||||||
|
ports:
|
||||||
|
- "8000:8000"
|
||||||
|
- "9654:9654"
|
||||||
|
volumes:
|
||||||
|
- ./data:/app/config
|
||||||
|
environment:
|
||||||
|
- PUID=0
|
||||||
|
- PGID=0
|
||||||
|
devices:
|
||||||
|
- /dev/input
|
||||||
|
working_dir: /app/config
|
||||||
|
restart: unless-stopped
|
Loading…
Reference in New Issue
Block a user