SolidInvoice / SolidInvoice

Simple and elegant invoicing solution.
https://solidinvoice.co
MIT License
572 stars 173 forks source link

Deploy docker full image 2.2.6-full missing files error #1162

Closed hari-bo closed 1 month ago

hari-bo commented 1 month ago

Describe the bug I've prepared the mandatory steps for using the docker full image which has the database included. But when trying to access the web interface via port 80 or 443 the screen is blank. Within the logging there are errors with missing files.

NOTICE: PHP message: PHP Warning: require(/var/www/html/config/bundles.php): Failed to open stream: No such file or directory in /var/www/html/src/Kernel.php on line 43 NOTICE: PHP message: PHP Fatal error: Uncaught Error: Failed opening required '/var/www/html/config/bundles.php' (include_path='.:/usr/share/php') in /var/www/html/src/Kernel.php:43 Stack trace:

0 /var/www/html/vendor/symfony/http-kernel/Kernel.php(386): SolidInvoice\Kernel->registerBundles()

1 /var/www/html/vendor/symfony/http-kernel/Kernel.php(788): Symfony\Component\HttpKernel\Kernel->initializeBundles()

2 /var/www/html/vendor/symfony/http-kernel/Kernel.php(190): Symfony\Component\HttpKernel\Kernel->preBoot()

3 /var/www/html/vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php(35): Symfony\Component\HttpKernel\Kernel->handle()

4 /var/www/html/vendor/autoload_runtime.php(35): Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run()

5 /var/www/html/public/index.php(19): require_once('...')

6 {main}

thrown in /var/www/html/src/Kernel.php on line 43

To Reproduce Deploy docker container with the following config

version: '3.9'

networks:
    prd-203: 
        external: true

services:
    SolidInvoice:
        container_name: SolidInvoice
        networks: 
          prd-203: 
            ipv4_address: 192.168.203.120
        ports:
            - 31307:80/tcp
            - 31308:443/tcp
        environment:
            - PGID=1000
            - PUID=1000
        volumes:
            - /mnt/SolidInvoice/var/www/html/config:/var/www/html/config
            - /mnt/SolidInvoice/var/lib/mysql:/var/lib/mysql
        restart: unless-stopped
        image: solidinvoice/solidinvoice:2.2.6-full

With the second retry i did an chmod with all permissions on the html folder so that wouldn't be an issue. chmod -R 777 /mnt/SolidInvoice/var/www/html

Expected behavior Functional web interface.

Desktop (please complete the following information):

pierredup commented 1 month ago

@hari-bo Can you try changing the mount for the config dir:

- /mnt/SolidInvoice/var/www/html/config:/var/www/html/config
+ /mnt/SolidInvoice/var/www/html/config/env:/var/www/html/config/env
hari-bo commented 1 month ago

That did the trick! In the documentation it is incorrect and only describes the /var/www/html/config path.

pierredup commented 1 month ago

Thank you for the report @hari-bo , I have updated the documentation to specify the correct config location