Giter VIP home page Giter VIP logo

barcodebuddy-docker's People

Contributors

forceu avatar woosterinitiative avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

barcodebuddy-docker's Issues

[wontfix] incompatability with lxc and zfs

I wanted to submit this in case any one else was having the same issue I'd been trying to deal with for the last few days (and is also running docker in an lxc container with proxmox).

Symptom: Error log for container shows unlinkat invalid args error and the container is inaccessible.
Cause: Some of the system calls docker uses don't work with dockers default overlay2 storage driver while on top of zfs 2.1.x. Frustratingly this does not affect every docker container so some will work fine.

Fix:

  1. If possible update the zfs fs to version 2.2.0 which is supposed to work natively
  2. Change docker storage driver to fuse-overlayfs (which I've done and can confirm it works fine)

Unable to connect to API: Could not connect to server

I've setup both grocy and barcode buddy via docker on the same raspberry pi.

The android grocy app can connect via an API-Key to grocy. However I can't connect barcode buddy to grocy using either the same or another API-Key.

This is what grocy and barcode buddy look like:

Grocy API:

grafik

BB Config:

grafik

No barcodes showing up in overview

CFD6A789-66B8-4E40-8920-3983149980EA

I can see where they’re being read and showing up as unknown in processed after scanning random things in my house, but after reading the documentation, aren’t they supposed to show up in the top pane so I can add them to Grocy?

Offer option to set UID and GID for the user running barecodebuddy in the Docker container

Originally posted here by @wechsler42: Forceu/barcodebuddy#109

Hi there,
first of all thank you very much for sharing barecode buddy with us! I use it in a Docker environment together with the Android app.
I would like to suggest to offer a possibility to set the UID and the GID for the user used to run barecode buddy in the docker container.
I work with this docker-compose file, user 1002 is a designated docker user on my docker host:

version: '2.1'
services:
barcodebuddy-docker:
volumes:

  • 'path_to_my_directory_on_docker_host:/config'
    ports:
  • '8082:80'
  • '9443:443'
    image: 'f0rc3/barcodebuddy-docker:v1.5.1.0'
    user: "1002:100"
    restart: unless-stopped

When I use a user other than root to run barecode buddy in the container than I receive this error: "s6-mkdir: warning: unable to mkdir /var/run/s6: Permission denied".

Unable to connect to API: Could not connect to server

Hi! My docker install is unable to connect to my docker grocy container: "Unable to connect to API: Could not connect to server". I tried both the "latest" and "lastest-dev" for barcodebuddy. Both containers are together in "bridge". The IP is written like this: http://192.XXX.XXX.12:9191/api/. Replacing the IP of grocy with the container IP (looked up via portainer) also did not solve the problem. My research did not yield any solutions. Can someone please help me?

edit:
Also tried adding the environment variables:

BBUDDY_CURL_ALLOW_INSECURE_SSL_CA true
BBUDDY_CURL_ALLOW_INSECURE_SSL_HOST true

Update manifest file

Good morning. I can only pull the latest tag from docker hub. Can you update the manifest file so I can pull for a different architecture?

Ex.)

$ docker pull f0rc3/barcodebuddy-docker:arm64v8-latest
Pulling from f0rc3/barcodebuddy-docker no matching manifest for linux/arm64/v8 in the manifest list entries

Thank you!

Consume same quantity as Purchased

When setting a quantity (by scanning the quantity barcode) it works perfectly when purchasing. But it would be great if that was also (optionally) applied to consuming.

Example: Parent product Egg. Child products are Egg boxes of various sizes. Adding number of eggs is easy. But I also consume eggs by box/carton, not egg by egg.

The more "normal" usecase with for example sixpack of cola - the bottles have their own barcode and the pack has its own too.

The best option would be if default quantities could be entered in the UI and also chosen if to apply by purchase and/or consume.

Authentication Failed in iframes

I have recently setup BarcodeBuddy in docker on a server but while figuring out the best way to use it with my workflow, I moved it to run in Docker on a RPI. Everything was running fine but recently I changed it so that it was running back on the original server (and the RPI just running the grabInput.sh script) and now authentication is failing by looping back to the login with empty UN and PW fields when using it through an iframe. Normally this is through the side panel pages in Home Assistant but was able to replicate in a simple local HTML page that just has an iframe panel.

My setup is BarcodeBuddy running docker on the server, a nginx reverse proxy that points to the BB HTTPS port, then Home Assistant pointing to the reverse proxy URL. Before moving stuff around, everything was working fine but after moving, entering the credentials just refreshes the page and empties the username and password fields. I created a new container with the base config and it was experiencing the issue too, I also recreated the container on the RPI with the same settings, and it also experienced the same issue.

I enabled Debug logging but it does not appear to capture anything with what is occurring. BB does work if I disable authentication though and directly through the reverse proxy URL. I am wondering if this is a browser security "thing" but can't confirm.

Tested using latest, arm32v7-latest, and v1.8.0.2 tags.

Add option to allow insecure ssl certificates

I have the Grocy add-on running in Hass.io and I'm trying to connect it to barcodebuddy running in Docker. I can access the Grocy API using https://192.168.0.12:9192/api/ but when I put that value into the barcodebuddy setup screen along with the correct API key, I just get "Unable to connect to API: Could not connect to server."

When I run this, I get an appropriate response, I know the url and api key I'm entering are correct:
curl -k -H "GROCY-API-KEY:MY_API_KEY" -X GET "https://192.168.0.12:9192/api/system/info" -H "accept: application/json"

Any help would be appreciated.

Docker run doesn't create new container.

I have grocy running in docker (docker-compose) but I can't get barcodebuddy-docker to run. The output of my logs is:

standard_init_linux.go:211: exec user process caused "exec format error"

I have a feeling this is an architecture issue. I'm running on a raspberry pi 3B+, my architecture is armv7, although Alpine should support this. Any ideas?

Doesn't work with linuxserver.io grocy Image

Unfortunately the newest versions of BBB don't seem to work with the current latest version from linuxserver.io. Are there any work arounds for this other than pinning to something old?

Add support for arm32v6

I have a Docker container running Grocy on an original Raspberry Pi zero which has an arm32v6 processor on it. It would be useful to have support for BarcodeBuddy on this device also.

I have never built a container before, but I will give it a try. I will see what I can do and if I am successful, I will make a pull request.

Docker container is stuck after a while

This Ticket was moved/copied from here.

Hi,

i have observed a strange issue while running barcode buddy in a docker container on my rasberry-pi: After some running time, the docker container seems to be stuck somehow. I can open the login screen on the frontend, but after i try to login i see a white screen.

That's what i see, after i log in in the developer console:

Console

grafik
what i see, after i log in in the developer console:

Network

grafik

I have tried to restart the container, but that doesn't seem to help. Also restarting the entire raspberry pi does not help. After logging in i only see a white screen.
I can stop the container and delete the volumes, that helps, but 1. i loose all my settings and 2. i would have to do that periodically.

Anyone had a similar issue?

Websocket issues

Thanks for the docker-image! But I still have websocket-issues, even while I'm not using any SSL.
image
image

What am I doing wrong, can't stand it for not figuring it out :-)

arm64 Dockerfile missing gettext

Hi,

When I install the docker image using docker compose. I got an error in the web inteface:

Installed: curl Installed: date Installed: sqlite3 Installed: json Installed: sockets Installed: redis Installed: mbstring Not installed: gettext (required)

I tried to install gettext but no better result still:
Not installed: gettext (required)

this is the docker-compose file:

barcodebuddy: image: f0rc3/barcodebuddy-docker:arm64v8-v1.8.1.5 container_name: barcodebuddy environment: - PUID=1000 - PGID=1000 - TZ=Europe/Amsterdam volumes: - ./volumes/barcodebody/config:/config ports: - 9284:80 - 444:443 restart: unless-stopped

Add support for X-Forwarded-Proto header

By default nginx doesn't use the X-Forwarded-Proto header to set the HTTPS entry in the S_SERVER global array. By updating the default nginx file, that could be remedied. For apache SetEnvIf can be used in a htaccess file, for nginx, no idea what the best approach is tbh.

Allow device binding by id

Hi!

I'm currently using barcode buddy via docker on a ubuntu host, with a physical scanner.
It all worked perfectly, until I rebooted by server and the device address changed from /dev/input/event4 to /dev/input/event3. This means every time I reboot my server I run the change of having to setup my container again because the address has changed.
Is it possible to bind to the address using something like a device id?

If I run this command:
ls -l /dev/input/by-id/
I get the following response:
lrwxrwxrwx 1 root root 9 janv. 21 19:10 usb-Netum._HIDKB_18502-event-kbd -> ../event3

Thanks in advance :)

PHP error on start

Hello,
I have an issue while I launch the docker container. I tried with a locally built docker image and from the official one. I can't connect to the server (got an Error 500). And when I look the standard output I got a loop with this error:

PHP Parse error:  syntax error, unexpected '?', expecting function (T_FUNCTION) or const (T_CONST) in /app/bbuddy/incl/config.inc.php on line 9

I would like to know if someone else got this issue

Not possible to install the docker image in HA

It is currently not possible without modifications to install the current docker image

arm64v8-v1.8.1.5

as addon in Homeassistant. I figured out, that it seems to be conected to the used OS/ARCH plattform on Docker hub:


1.8.1.5 uses: linux/arm/v7

1.8.1.3 uses: linux/arm

my suggestion is to use linux/arm64 as used for the HA docker container.

HA logs the error:

23-03-09 15:09:09 ERROR (SyncWorker_2) [supervisor.docker.addon] Can't build 61bf1443/aarch64-addon-bbuddy-grocy:dev-docker-based: no matching manifest for linux/arm64 in the manifest list entries
23-03-09 15:09:09 ERROR (SyncWorker_2) [supervisor.docker.addon] Build log: 
Step 1/13 : ARG BUILD_FROM
Step 2/13 : FROM ${BUILD_FROM}

I played around with a fork and could get it working by modifing the build.json to (which I know is wrong but then HA uses then the docker image):

"arm64": "f0rc3/barcodebuddy-docker:arm64v8:latest", (exchanged aarch64 with arm64)

HA is logging the following:

23-03-09 15:27:06 CRITICAL (SyncWorker_5) [supervisor.utils.common] Can't parse /data/addons/git/61bf1443/build.json: extra keys not allowed @ data['build_from']['arm64']. Got 'f0rc3/barcodebuddy-docker:arm64v8:latest'

1.8.1.5 can now start on HA (with init:false in the config.json), but I can not connect to it. With 1.8.1.3 I can connect to it and I will strick to it for now (using my fork).

Consume/Purchase

Thanks for the great job you did.
I'm using Grocy and Barcode Buddy as docker in the latest version
In Grocy, for example, I can set barcode "123456" purchase 1 package corresponds to 6 pieces in consumption.
If I enter the code 123456 in Grocy as purchase, it also counts 6 pieces in the stock.
If I enter 123456 as consumption, it reduces 1 piece in Stock

If I scan the code as a purchase with Barcodebuddy then it counts only 1 piece but not 6 pieces as it should be.

Problem mapping barcode scanner into docker container

Hi,

i just setup barcodebuddy on my raspberry pi 4 using docker. Here is my docker-compose.yml

ersion: '3.5'

services:
  barcode-buddy:
    image: f0rc3/barcodebuddy-docker:arm32v7-latest
    restart: unless-stopped
    volumes:
      - bbconfig:/config
    devices:
      - /dev/input/event0:/dev/input/event0
    ports:
      - 50000:80
    environment:
      - ATTACH_BARCODESCANNER=true
      - BBUDDY_EXTERNAL_GROCY_URL=http://grocy.mydomain.local

volumes:
  bbconfig:

when i run the container with docker-compose i see the following log:

barcode-buddy_1  | [cont-init.d] 10-adduser: executing... 
barcode-buddy_1  | usermod: no changes
barcode-buddy_1  | 
barcode-buddy_1  | ----------------------------------------------------------------------------
barcode-buddy_1  | 
barcode-buddy_1  |  ______                            _       ______            _     _       
barcode-buddy_1  | (____  \                          | |     (____  \          | |   | |      
barcode-buddy_1  |  ____)  ) ____  ____ ____ ___   _ | | ____ ____)  )_   _  _ | | _ | |_   _ 
barcode-buddy_1  | |  __  ( / _  |/ ___) ___) _ \ / || |/ _  )  __  (| | | |/ || |/ || | | | |
barcode-buddy_1  | | |__)  | ( | | |  ( (__| |_| ( (_| ( (/ /| |__)  ) |_| ( (_| ( (_| | |_| |
barcode-buddy_1  | |______/ \_||_|_|   \____)___/ \____|\____)______/ \____|\____|\____|\__  |
barcode-buddy_1  |                                                                     (____/ 
barcode-buddy_1  | 
barcode-buddy_1  |                    Thank you for using our Docker image! 
barcode-buddy_1  | 
barcode-buddy_1  |                   https://github.com/Forceu/barcodebuddy
barcode-buddy_1  |                https://github.com/Forceu/barcodebuddy-docker
barcode-buddy_1  | ---------------------------------------------------------------------------
barcode-buddy_1  | 
barcode-buddy_1  | [cont-init.d] 10-adduser: exited 0.
barcode-buddy_1  | [cont-init.d] 10-migration: executing... 
barcode-buddy_1  | [cont-init.d] 10-migration: exited 0.
barcode-buddy_1  | [cont-init.d] 20-config: executing... 
barcode-buddy_1  | [cont-init.d] 20-config: exited 0.
barcode-buddy_1  | [cont-init.d] 30-keygen: executing... 
barcode-buddy_1  | using keys found in /config/keys
barcode-buddy_1  | [cont-init.d] 30-keygen: exited 0.
barcode-buddy_1  | [cont-init.d] 50-config: executing... 
barcode-buddy_1  | [cont-init.d] 50-config: exited 0.
barcode-buddy_1  | [cont-init.d] 60-savearguments: executing... 
barcode-buddy_1  | [EnvParser] Parsing environment variables
barcode-buddy_1  | [EnvParser] ATTACH_BARCODESCANNER set, enabling input grabber
barcode-buddy_1  | [cont-init.d] 60-savearguments: exited 0.
barcode-buddy_1  | [cont-init.d] 90-custom-folders: executing... 
barcode-buddy_1  | [cont-init.d] 90-custom-folders: exited 0.
barcode-buddy_1  | [cont-init.d] 99-custom-files: executing... 
barcode-buddy_1  | [custom-init] no custom files found exiting...
barcode-buddy_1  | [cont-init.d] 99-custom-files: exited 0.
barcode-buddy_1  | [cont-init.d] done.
barcode-buddy_1  | [services.d] starting services
barcode-buddy_1  | [services.d] done.
barcode-buddy_1  | [ScannerConnection] Waiting for scanner input
barcode-buddy_1  | [info] Starting socket server on 127.0.0.1:47631

As it seems barcode buddy recognises my barcode scanner and the environment variable ATTACH_BARCODESCANNER. But when i got to the "screen" page and scan a grocy-known package of salt nothing is happening. No code is scanned, i get no logs whatsoever.

On the raspberry pi host, i can use evtest successfully using the device /dev/input/event0. But when i enter the container and try evtest i get the following message:

***********************************************
  This device is grabbed by another process.
  No events are available to evtest while the
  other grab is active.
  In most cases, this is caused by an X driver,
  try VT-switching and re-run evtest again.
  Run the following command to see processes with
  an open fd on this device
 "fuser -v /dev/input/event0"
***********************************************

I have googled a bit but couldn't find a solution for that. I guess that it's something special with the docker container?

can you help me?

Container time and log file timestamps missmatch

Hi there,
without setting the TZ environment variable, I get:
root@0bd1db695c6f:/# date
Sat Jan 30 12:32:33 UTC

If I set the environment variable
TZ=Europe/Berlin (UTC+1 at the moment)
I get:
root@752f4f15e526:/# date
Sat Jan 30 13:33:49 CET 2021

But in the Web UI, the log of processed barcodes shows in both cases the UTC time, see for example:
2021-01-30 12:34:36: Unknown product already scanned. Increasing quantity. Barcode: XXXXXXXXXX

How to get the barcode buddy log to respect the timezone of the container?
Thanks in advance for a hint.

Continual error when starting docker container

I'm getting the continuous error :

FS Error DATA_PATH_NOT_WRITABLE: Database file cannot be created, as folder or database file is not writable. Please check your permissions.

I have mapped both /config and /data to rw folders on my host system. Permissions look correct.

Installation of ZeroTier VPN on Docker Instance

Objective:

  • Create self-hosted cloud network with services to enhance the quality of life for my wife.
  • Want to have applications individually addressed in the VPN to rule out TCP/IP issues between applications.
  • This would also ease administration of the application stack as the stack builds

Resources:

  • Windows host OS running Hyper-v Virtual Ubuntu machines (for portability will be migrating to an actual server soon)
  • Ubuntu machine is running Docker with Grocy and BarcodeBuddy
  • Docker container is installed with ZeroTier VPN and is servicing both applications with the same IP address on the vpn

Issue:

  • Once inside the BarcodeBuddy docker instance several crucial commands for the software installation are missing (apt, dkpg, and more)

  • How would I install Zerotier VPN on the BarcodeBuddy docker machine?

Clean install failed using latest image

Hi @Forceu!

First of all many thanks for your Barcode Buddy tool!

I tried to update to the latest image this afternoon but it seems that something is not right, I've just tried to do a clean install like:

docker run -d -v bbconfig:/config -p 8099:80 -p 4430:443 f0rc3/barcodebuddy-docker:latest

but I've got:

2020/04/14 15:19:17 [error] 344#344: *1 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Delight\Db\Throwable\Error: could not find driver in /app/bbuddy/incl/authentication/composer/vendor/delight-im/db/src/ErrorHandler.php:87
Stack trace:
#0 /app/bbuddy/incl/authentication/composer/vendor/delight-im/db/src/PdoDatabase.php(476): Delight\Db\ErrorHandler::rethrow(Object(PDOException))
#1 /app/bbuddy/incl/authentication/composer/vendor/delight-im/db/src/PdoDatabase.php(498): Delight\Db\PdoDatabase->ensureConnected()
#2 /app/bbuddy/incl/authentication/composer/vendor/delight-im/db/src/PdoDatabase.php(568): Delight\Db\PdoDatabase->normalizeConnection()
#3 /app/bbuddy/incl/authentication/composer/vendor/delight-im/db/src/PdoDatabase.php(125): Delight\Db\PdoDatabase->selectInternal(Object(Closure), 'SELECT roles_ma...', Array)
#4 /app/bbuddy/incl/authentication/composer/vendor/delight-im/auth/src/Administration.php(282): Delight\Db\PdoDatabase->selectValue('SELECT roles_ma...', Array)
#5 /app/bbuddy/incl/authentication/authentication.inc.php(34): Deli" while reading response header from upstream, client: 192.168.1.157, server: _, request: "GET /login.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "192.168.1.2:8099"

Is there anything new that I have to install in the container?

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.