grocy / grocy-docker

ERP beyond your fridge - now containerized - this is the docker repo of https://github.com/grocy/grocy
MIT License
411 stars 119 forks source link

Frontend issues with grocy >= 4.0.1 #223

Closed tmm360 closed 1 year ago

tmm360 commented 1 year ago

I'm using Grocy with docker compose. With version 4.0.0 I've no problems, with versions 4.0.1 and 4.0.2 when I try to access to http://<myserverip>:8081/stockoverview I get only a black page with a barcode in the middle, and trying to access in private mode I get an infinite 302 redirect to http://<myserverip>:8081/login.

My docker compose file:

version: '3.8'

services:

  frontend:
    image: "grocy/frontend:v4.0.2"
    depends_on:
      - backend
    ports:
      - '8081:8080'
    read_only: true
    tmpfs:
      - /tmp
    volumes:
      - /var/log/nginx
    restart: always

  backend:
    image: "grocy/backend:v4.0.2"
    environment:
      - GROCY_MODE=production
      - GROCY_CULTURE=it
      - MAX_UPLOAD=50M
      - PHP_MAX_FILE_UPLOAD=200
      - PHP_MAX_POST=100M
      - PHP_MEMORY_LIMIT=512M
    expose:
      - '9000'
    read_only: true
    tmpfs:
      - /tmp
    volumes:
      - /var/log/php8
      - app-db:/var/www/data
    restart: always

volumes:
  app-db:

I've tested with both Brave and Firefox.

jayaddison commented 1 year ago

Hi @tmm360 - thanks for the report! Could you check the contents of this line of the Containerfile-frontend file and confirm whether the path there is /var/www/public/packages (current) or /var/www/public/node_modules (outdated)?

There was a change for this directory path in Grocy v4.x and this could be the cause of the problem here.

jayaddison commented 1 year ago

Hrm. Maybe that's not the problem here after all, since you mention it was working fine with v4.0.0 ... doing some more thinking/reading.

jayaddison commented 1 year ago

Ok, this sounds similar to https://github.com/linuxserver/docker-grocy/issues/72

Recommendation: try removing the contents of your /var/www/data/viewcache directory, and see whether that helps.

tmm360 commented 1 year ago

@jayaddison you are great, it solved!! :) Thank you for your fast help!