SolidInvoice: Database does not initialize on first install via docker compose
I attempted to install SolidInvoice using the Docker Compose file from GitHub on TrueNAS Scale (Electric Eel). While the application starts and runs fine, the database fails to initialize during the first install. When I navigate to the assigned IP and port in my browser, I only see a blank white screen—there’s no prompt to create the database. I copied the Compose file, making only minor adjustments to the port and volume paths. I suspect I might be missing some required environment variables. Any insights or assistance would be greatly appreciated!
Docker Compose File:
services:
app:
depends_on:
- db
environment:
SOLIDINVOICE_DATABASE_DRIVER: pdo_mysql
SOLIDINVOICE_DATABASE_HOST: db
SOLIDINVOICE_DATABASE_NAME: solidinvoice
SOLIDINVOICE_DATABASE_PASSWORD: sdfgsdfgasdjhjlgghjsdfg
SOLIDINVOICE_DATABASE_PORT: 3306
SOLIDINVOICE_DATABASE_USER: root
image: solidinvoice/solidinvoice:latest
ports:
- '8766:8765'
restart: always
volumes:
- /mnt/Share/Apps/Solid_Invoice/Appdata:/etc/solidinvoice
db:
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: 1
MYSQL_DATABASE: solidinvoice
image: mysql:8.0
restart: always
volumes:
- /mnt/Share/Apps/Solid_Invoice/Database:/var/lib/mysql
volumes:
app_data: Null
db_data: Null
DB logs:
2025-04-30 13:04:34.921353+00:002025-04-30T13:04:34.920776Z 0 [ERROR] [MY-010119] [Server] Aborting
2025-04-30 13:04:34.921408+00:002025-04-30T13:04:34.920924Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.42) MySQL Community Server - GPL.
2025-04-30 13:05:35.974166+00:002025-04-30 13:05:35+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.42-1.el9 started.
2025-04-30 13:05:36.197767+00:002025-04-30 13:05:36+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2025-04-30 13:05:36.208575+00:002025-04-30 13:05:36+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.42-1.el9 started.
2025-04-30 13:05:36.411516+00:002025-04-30 13:05:36+00:00 [Note] [Entrypoint]: Initializing database files
2025-04-30 13:05:36.424734+00:002025-04-30T13:05:36.421725Z 0 [Warning] [MY-011068] [Server] The syntax '--skip-host-cache' is deprecated and will be removed in a future release. Please use SET GLOBAL host_cache_size=0 instead.
2025-04-30 13:05:36.424799+00:002025-04-30T13:05:36.421844Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.42) initializing of server in progress as process 80
2025-04-30 13:05:36.424825+00:002025-04-30T13:05:36.424480Z 0 [ERROR] [MY-010457] [Server] --initialize specified but the data directory has files in it. Aborting.
2025-04-30 13:05:36.424847+00:002025-04-30T13:05:36.424489Z 0 [ERROR] [MY-013236] [Server] The designated data directory /var/lib/mysql/ is unusable. You can remove all files that the server added to it.
2025-04-30 13:05:36.425145+00:002025-04-30T13:05:36.424539Z 0 [ERROR] [MY-010119] [Server] Aborting
2025-04-30 13:05:36.425190+00:002025-04-30T13:05:36.424665Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.42) MySQL Community Server - GPL.
2025-04-30 13:06:37.320956+00:002025-04-30 13:06:37+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.42-1.el9 started.
2025-04-30 13:06:37.584193+00:002025-04-30 13:06:37+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2025-04-30 13:06:37.595968+00:002025-04-30 13:06:37+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.42-1.el9 started.
2025-04-30 13:06:37.811014+00:002025-04-30 13:06:37+00:00 [Note] [Entrypoint]: Initializing database files
2025-04-30 13:06:37.826411+00:002025-04-30T13:06:37.823388Z 0 [Warning] [MY-011068] [Server] The syntax '--skip-host-cache' is deprecated and will be removed in a future release. Please use SET GLOBAL host_cache_size=0 instead.
2025-04-30 13:06:37.826456+00:002025-04-30T13:06:37.823515Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.42) initializing of server in progress as process 80
2025-04-30 13:06:37.826472+00:002025-04-30T13:06:37.826182Z 0 [ERROR] [MY-010457] [Server] --initialize specified but the data directory has files in it. Aborting.
2025-04-30 13:06:37.826486+00:002025-04-30T13:06:37.826191Z 0 [ERROR] [MY-013236] [Server] The designated data directory /var/lib/mysql/ is unusable. You can remove all files that the server added to it.
2025-04-30 13:06:37.826817+00:002025-04-30T13:06:37.826245Z 0 [ERROR] [MY-010119] [Server] Aborting
2025-04-30 13:06:37.826852+00:002025-04-30T13:06:37.826384Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.42) MySQL Community Server - GPL.
2025-04-30 13:07:38.819362+00:002025-04-30 13:07:38+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.42-1.el9 started.
2025-04-30 13:07:39.048173+00:002025-04-30 13:07:39+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2025-04-30 13:07:39.060158+00:002025-04-30 13:07:39+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.42-1.el9 started.
2025-04-30 13:07:39.274160+00:002025-04-30 13:07:39+00:00 [Note] [Entrypoint]: Initializing database files
2025-04-30 13:07:39.289686+00:002025-04-30T13:07:39.286603Z 0 [Warning] [MY-011068] [Server] The syntax '--skip-host-cache' is deprecated and will be removed in a future release. Please use SET GLOBAL host_cache_size=0 instead.
2025-04-30 13:07:39.289761+00:002025-04-30T13:07:39.286729Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.42) initializing of server in progress as process 80
2025-04-30 13:07:39.289779+00:002025-04-30T13:07:39.289398Z 0 [ERROR] [MY-010457] [Server] --initialize specified but the data directory has files in it. Aborting.
2025-04-30 13:07:39.289800+00:002025-04-30T13:07:39.289407Z 0 [ERROR] [MY-013236] [Server] The designated data directory /var/lib/mysql/ is unusable. You can remove all files that the server added to it.
2025-04-30 13:07:39.290086+00:002025-04-30T13:07:39.289460Z 0 [ERROR] [MY-010119] [Server] Aborting
2025-04-30 13:07:39.290122+00:002025-04-30T13:07:39.289614Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.42) MySQL Community Server - GPL.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 27 (12 by maintainers)
Version 2.3.5 has just been released. Not sure if it will fix the hanging when creating an invoice, but worth a try. It also fixes the following issue: