Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Creating Backups fails #4

Closed
Dschogo opened this issue Feb 20, 2024 · 6 comments
Closed

[Bug] Creating Backups fails #4

Dschogo opened this issue Feb 20, 2024 · 6 comments

Comments

@Dschogo
Copy link

Dschogo commented Feb 20, 2024

Describe the bug
Creating a backup results in an error Undefiend constant: Spatie\Backup\Tasks\Backup\SIGINT.

image

local_public / local_private nor backup type changes this behavior.

Expected behavior
Create a backup without error.

Additional info
How should a backup be restored? Didn't see anything during setup/menu option. Enter docker (for me) and execute restore directly on the database via cli?

Please complete the following information:

  • InvoiceShelf version: docker-compose (invoiceshelf/invoiceshelf:latest) - 1.1.0
  • PHP version: bundled
  • Database type and version: bundled

Optional info

  • OS: docker host: debian arm64
  • Browser: Firefox
docker-compose.yml
#-------------------------------------------
#  Docker Compose
#  - Darko Gjorgjijoski
# Repo : https://github.com/InvoiceShelf/docker
#-------------------------------------------

version: '3'

services:
   invoiceshelf_db:
     container_name: invoiceshelf_db
     image: mariadb:10
     environment:
       - MYSQL_ROOT_PASSWORD=randompw
       - MYSQL_DATABASE=invoiceshelf
       - MYSQL_USER=invoiceshelf
       - MYSQL_PASSWORD=randompw
     expose: 
       - 3306
     volumes:
       - mysql:/var/lib/mysql
     networks:
       - invoiceshelf
     restart: unless-stopped

   invoiceshelf:
     image: invoiceshelf/invoiceshelf
     container_name: invoiceshelf
     ports:
       - 90:80
     volumes:
       - ./invoiceshelf/data:/data
     networks:
       - invoiceshelf
     environment:
       - PUID=1000
       - PGID=1000
       - USER=invoiceshelf
       - PHP_TZ=UTC
       - TIMEZONE=UTC
       - DB_CONNECTION=mysql
       - DB_HOST=invoiceshelf_db
       - DB_PORT=3306
       - DB_DATABASE=invoiceshelf
       - DB_USERNAME=invoiceshelf
       - DB_PASSWORD=randompw
       - STARTUP_DELAY=0
     restart: unless-stopped
     depends_on:
       - invoiceshelf_db

networks:
   invoiceshelf:

volumes:
    mysql:
@gdarko gdarko transferred this issue from InvoiceShelf/InvoiceShelf Feb 20, 2024
@sebarnd
Copy link
Contributor

sebarnd commented Feb 28, 2024

Hi,

according to spatie/laravel-backup#1445 this is due to the need of the pcntl php extension which is missing in the docker image. I'm afraid the most easy way to solve that would be to switch to the official php-fpm docker image?! @gdarko what do you think?

@Dschogo
Copy link
Author

Dschogo commented Feb 28, 2024

Ah good find!

Then something like this in the Dockerfile should fix it, can test it tomorrow.

RUN docker-php-ext-configure pcntl --enable-pcntl \
  && docker-php-ext-install pcntl;

@Dschogo
Copy link
Author

Dschogo commented Feb 29, 2024

Update: doesnt work that easy, i've managed to include pcntl by installing it via pecl/pear but same result.

Strangely php -i | grep pcntl results even in the current image to

root@10305fca2c7c:/var/www/html/InvoiceShelf# php -i | grep pcntl
pcntl
pcntl support => enabled

so it's already there but can't be used/ found? Maybe using a base php image is the only easier way.

@nielsdrost7
Copy link

nielsdrost7 commented Feb 29, 2024

Maybe using a base php image is the only easier way.

Or copy it from the baseImage into your own produced image?

@gdarko
Copy link
Contributor

gdarko commented Apr 10, 2024

The issue will be resolved once v1.2.0 is out, soon.

@gdarko
Copy link
Contributor

gdarko commented Jul 13, 2024

The issue has been resolved as of 1.2.0+ version.

Best Regards,
Darko

@gdarko gdarko closed this as completed Jul 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants