Ubuntu下自建Invoice Ninja:创建账户后白屏问题求助
在Ubuntu上Docker部署Invoice Ninja后创建账户出现白屏问题
我正尝试在Ubuntu系统上通过Docker部署自建Invoice Ninja实例,克隆了dockerfiles/debian和invoiceninja两个仓库,文件结构如下:
invoiceninja/nginx invoiceninja/php invoiceninja/scripts invoiceninja/supervisor invoiceninja/Dockerfile invoiceninja/docker-compose.yml invoiceninja/app invoiceninja/bootstrap invoiceninja/config invoiceninja/database // Other Invoice Ninja files and folders
我根据需求修改了docker-compose.yml、Dockerfile和nginx/laravel.conf文件,构建过程成功完成,但创建账户后应用显示白屏。
以下是我的修改内容:
修改后的Dockerfile
# Copy local Invoice Ninja code COPY . /var/www/html # PHP modules (ensure these include all required extensions) ARG php_require="bcmath gd mbstring pdo_mysql zip" ARG php_suggest="exif imagick intl pcntl soap saxon-12.5.0" ARG php_extra="opcache" # Install system dependencies RUN apt-get update && apt-get install -y --no-install-recommends \ mariadb-client \ gpg \ supervisor \ fonts-noto-cjk-extra \ fonts-wqy-microhei \ fonts-wqy-zenhei \ xfonts-wqy \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* # Install PHP extensions (this includes zip, bcmath, gd) COPY --from=ghcr.io/mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/ RUN install-php-extensions \ ${php_require} \ ${php_suggest} \ ${php_extra} # Install Composer COPY --from=composer:latest /usr/bin/composer /usr/bin/composer # Install dependencies RUN composer install --no-dev --prefer-dist --optimize-autoloader # Create symlink for frontend RUN ln -s /var/www/html/resources/views/react/index.blade.php /var/www/html/public/index.html \ && php artisan storage:link \ && mv /var/www/html/public /tmp/public USER www-data
修改后的docker-compose.yml
services: app: build: context: . # Use local files instead of pulling from a remote image restart: unless-stopped env_file: - ./.env volumes: - .:/var/www/html - app_cache:/var/www/html/bootstrap/cache - app_public:/var/www/html/public - app_storage:/var/www/html/storage
修改后的laravel.conf
location ~ \.php$ { fastcgi_pass invoiceninja-app-1:9000; fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; include fastcgi_params; }
.env文件内容
DB_HOST="invoiceninja-mysql-1" DB_DATABASE="ninja" DB_USERNAME="ninja" DB_PASSWORD="ninja" DB_PORT="3306" MYSQL_ROOT_PASSWORD="root"
压缩文件解压后运行以下命令即可启动:
docker-compose up --build -d
恳请帮忙运行并定位问题,若能提供修复建议将不胜感激。谢谢!
内容的提问来源于stack exchange,提问作者user275472
相关产品推荐
相关产品推荐

