baikal-docker icon indicating copy to clipboard operation
baikal-docker copied to clipboard

Only when restarting container: "Plugin.php differs from the packaged version"

Open Krystof0 opened this issue 7 months ago • 1 comments

Thank you for your great work!

Because of the newly integrated hafix I installed the new 0.10.1+hafix (apache) this week. It works perfectly until I stop and start the container:

[Thu May 01 17:43:34.435303 2025] [mpm_prefork:notice] [pid 1:tid 1] AH00170: caught SIGWINCH, shutting down gracefully
/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
/docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
/docker-entrypoint.sh: Launching /docker-entrypoint.d/30-apply-home-assistant-fix.sh
30-apply-home-assistant-fix.sh: info: Plugin.php differs from the packaged version

This error happens every time when I use docker compose stop - docker compose start (or docker compose restart)

Everything works great if I use docker compose down - docker compose up (before or after the error occured)

My configuration:

OpenMediaVault 7.7.6-1 on Pi4b/8 up to date

services:
  baikal:
    image: ckulka/baikal:apache
    container_name: baikalapache
    environment:
      - PUID=${APPUSER_PUID}
      - PGID=${APPUSER_PGID}
      - TZ=${TIME_ZONE_VALUE}
      - APPLY_HOME_ASSISTANT_FIX=true
      - BAIKAL_SERVERNAME=cfnas1.local
      - BAIKAL_SERVERALIAS=localhost
    ports:
      - "8080:80"
      - "8443:443"
    volumes:
      - ./config:/var/www/baikal/config
      - ./Specific:/var/www/baikal/Specific
      - /etc/ssl/private/baikal:/etc/ssl/private
    restart: unless-stopped

Krystof0 avatar May 01 '25 16:05 Krystof0

I have the same problem, i'm using the Nginx Docker image.

I think it have something to do with the exit 1 error code in line 19 that 30-apply-home-assistant-fix.sh gives back, when the fix was already applied. Because of the set -e in docker-entrypoint.sh, the container will immediately crash, getting another code as zero from one of it's commands. I believe, the best solution is to change exit 1 to exit 0, then it's working (and there is no proper reason, why it should give back an error code).

Mexlab avatar May 03 '25 07:05 Mexlab

It's a bit sad I have to run a customized build, because the MR doesn't get accepted. My instance stops working every time my server restarts because of this issue, causing all kinds of integrations to also break down.

vpmv avatar Jul 02 '25 13:07 vpmv

Hi all, sorry for the delay and thank you for reporting it 👍

I missed the obvious test scenario where the container would be restarted (I just delete them on stop and recreate new ones).

Thank you @Mexlab for providing a fix for it in the PR! I merged it, however I changed the script to still fail if there was a custom Plugin.php and it was not modified to include the HA fix (#289).

Erroring out made sense to me to inform the users that their intended behaviour (HA fix applied) did not work.

ckulka avatar Jul 29 '25 21:07 ckulka

New experimental images are now available - can you please give one of them a try and let me know if it work as expected?

  • ckulka/baikal:experimental-apache
  • ckulka/baikal:experimental-apache-php8.2
  • ckulka/baikal:experimental-nginx
  • ckulka/baikal:experimental-nginx-php8.2

ckulka avatar Jul 29 '25 21:07 ckulka

The new images with the fix are now available (they were tested in #284).

Closing this issue, but please let me know if something else is not working.

ckulka avatar Aug 01 '25 10:08 ckulka