Sorry for uploading this long bit of code but maybe it will be useful.
I added the DB_HOST, DB_USERNAME and DB_PASSWORD and left DB name blank i got error message 'unknown database ‘ninja’
So i created an empty database called ninja with the above user and then the docker ran with the fillowing info:
(you can see the first error at the beginning and then result after creating the empty db called ninja.
2022-09-20T16:16:31Z [INFO] [Entrypoint]: Initialising Invoice Ninja...
INFO Configuration cached successfully.
INFO Caching the framework bootstrap files.
config ........................................................... 43ms DONE
routes ........................................................... 92ms DONE
In Connection.php line 759:
SQLSTATE[HY000] [1049] Unknown database 'ninja' (SQL: select * from informa
tion_schema.tables where table_schema = ninja and table_name = accounts and
table_type = 'BASE TABLE')
In Connector.php line 70:
SQLSTATE[HY000] [1049] Unknown database 'ninja'
2022-09-20T16:20:29Z [INFO] [Entrypoint]: Initialising Invoice Ninja...
INFO Configuration cached successfully.
INFO Caching the framework bootstrap files.
config ........................................................... 68ms DONE
routes .......................................................... 142ms DONE
INFO Preparing database.
Creating migration table ......................................... 42ms DONE
INFO Loading stored database schemas.
database/schema/mysql-schema.dump ............................. 1,733ms DONE
INFO Running migrations.
2022_04_14_121548_forte_payment_gateway .......................... 36ms DONE
2022_05_18_162152_create_scheduled_jobs_table .................... 21ms DONE
2022_05_18_162443_create_schedulers_table ......................... 8ms DONE
2022_05_28_234651_create_purchase_orders_table .................. 125ms DONE
2022_05_30_181109_drop_scheduled_jobs_table ....................... 6ms DONE
2022_05_30_184320_add_job_related_fields_to_schedulers_table ..... 20ms DONE
2022_05_31_101504_inventory_management_schema .................... 44ms DONE
2022_06_01_215859_set_recurring_client_timestamp ................. 36ms DONE
2022_06_01_224339_create_purchase_order_invitations_table ..... 1,179ms DONE
2022_06_10_030503_set_account_flag_for_react ..................... 12ms DONE
2022_06_16_025156_add_react_switching_flag ........................ 9ms DONE
2022_06_17_082627_change_refresh_token_column_size ............... 45ms DONE
2022_06_21_104350_fixes_for_description_in_pdf_designs ............ 2ms DONE
2022_06_22_090547_set_oauth_expiry_column ......................... 9ms DONE
2022_06_24_141018_upgrade_failed_jobs_table ...................... 22ms DONE
2022_06_30_000126_add_flag_to_accounts_table ..................... 13ms DONE
2022_07_06_080127_add_purchase_order_to_expense .................. 90ms DONE
2022_07_09_235510_add_index_to_payment_hash ..................... 104ms DONE
2022_07_18_033756_fixes_for_date_formats_table_react .............. 1ms DONE
2022_07_21_023805_add_hebrew_language ............................. 8ms DONE
2022_07_26_091216_add_sms_verification_to_hosted_account ......... 36ms DONE
2022_07_28_232340_enabled_expense_tax_rates_to_companies_table ... 12ms DONE
2022_07_29_091235_correction_for_companies_table_types ........... 51ms DONE
2022_08_11_011534_licenses_table_for_self_host .................... 9ms DONE
2022_08_24_215917_invoice_task_project_companies_table ............ 9ms DONE
2022_08_26_232500_add_email_status_column_to_purchase_order_invitations_table 9ms DONE
2022_08_28_210111_add_index_to_payments_table .................... 64ms DONE
2022_09_05_024719_update_designs_for_tech_template ................ 3ms DONE
2022_09_07_101731_add_reporting_option_to_companies_table ........ 11ms DONE
2022-09-20T16:20:36Z [INFO] [Entrypoint]: /usr/local/bin/docker-entrypoint: running /docker-entrypoint-init.d/10-init-in.sh
INFO Seeding database.
Running DatabaseSeeder
Database\Seeders\ConstantsSeeder ................................... RUNNING
Database\Seeders\ConstantsSeeder ............................ 164.70 ms DONE
Database\Seeders\PaymentLibrariesSeeder ............................ RUNNING
Database\Seeders\PaymentLibrariesSeeder ..................... 221.93 ms DONE
Database\Seeders\BanksSeeder ....................................... RUNNING
Database\Seeders\BanksSeeder ................................ 757.53 ms DONE
Database\Seeders\CurrenciesSeeder .................................. RUNNING
Database\Seeders\CurrenciesSeeder ........................... 202.30 ms DONE
Database\Seeders\LanguageSeeder .................................... RUNNING
Database\Seeders\LanguageSeeder .............................. 58.95 ms DONE
Database\Seeders\CountriesSeeder ................................... RUNNING
Database\Seeders\CountriesSeeder ............................ 588.80 ms DONE
Database\Seeders\IndustrySeeder .................................... RUNNING
Database\Seeders\IndustrySeeder .............................. 55.61 ms DONE
Database\Seeders\PaymentTypesSeeder ................................ RUNNING
Database\Seeders\PaymentTypesSeeder .......................... 51.96 ms DONE
Database\Seeders\GatewayTypesSeeder ................................ RUNNING
Database\Seeders\GatewayTypesSeeder .......................... 23.95 ms DONE
Database\Seeders\DateFormatsSeeder ................................. RUNNING
Database\Seeders\DateFormatsSeeder ........................... 46.69 ms DONE
Database\Seeders\DesignSeeder ...................................... RUNNING
Database\Seeders\DesignSeeder ............................... 104.41 ms DONE
Tue, 20 Sep 2022 16:20:40 +0000 Create Single Account...
2022-09-20 16:20:42,027 WARN For [program:php-fpm], redirect_stderr=true but stderr_logfile has also been set to a filename, the filename has been ignored
2022-09-20 16:20:42,027 WARN For [program:scheduler], redirect_stderr=true but stderr_logfile has also been set to a filename, the filename has been ignored
2022-09-20 16:20:42,027 WARN For [program:queue-worker], redirect_stderr=true but stderr_logfile has also been set to a filename, the filename has been ignored
2022-09-20 16:20:42,027 WARN For [program:queue-worker], redirect_stderr=true but stderr_logfile has also been set to a filename, the filename has been ignored
2022-09-20 16:20:42,033 INFO supervisord started with pid 1
2022-09-20 16:20:43,037 INFO spawned: 'shutdown' with pid 88
2022-09-20 16:20:43,041 INFO spawned: 'php-fpm' with pid 89
2022-09-20 16:20:43,046 INFO spawned: 'queue-worker_00' with pid 90
2022-09-20 16:20:43,050 INFO spawned: 'queue-worker_01' with pid 91
2022-09-20 16:20:43,055 INFO spawned: 'scheduler' with pid 92
READY
[20-Sep-2022 16:20:43] NOTICE: [pool www] 'user' directive is ignored when FPM is not running as root
[20-Sep-2022 16:20:43] NOTICE: [pool www] 'user' directive is ignored when FPM is not running as root
[20-Sep-2022 16:20:43] NOTICE: [pool www] 'group' directive is ignored when FPM is not running as root
[20-Sep-2022 16:20:43] NOTICE: [pool www] 'group' directive is ignored when FPM is not running as root
[20-Sep-2022 16:20:43] NOTICE: fpm is running, pid 89
[20-Sep-2022 16:20:43] NOTICE: ready to handle connections
INFO Running schedule tasks every minute.
INFO Processing jobs from the [default] queue.
INFO Processing jobs from the [default] queue.
2022-09-20 16:20:44,922 INFO success: shutdown entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2022-09-20 16:20:44,923 INFO success: php-fpm entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2022-09-20 16:20:44,923 INFO success: queue-worker_00 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2022-09-20 16:20:44,923 INFO success: queue-worker_01 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2022-09-20 16:20:44,923 INFO success: scheduler entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
INFO No scheduled commands are ready to run.
INFO No scheduled commands are ready to run.
INFO No scheduled commands are ready to run.
2022-09-20T16:16:33Z [ERROR] [Entrypoint]: Error connecting to DB
I now open the created empty database and it is full of the info from the above run scripts.
The docker container now stays running and does not autoclose.
When i open the url to the docker I now get ‘502 Bad Gateway’
Error in the plesk error log say:
“124173#0: *894 upstream prematurely closed connection while reading response header from upstream”
and
“502 GET /favicon.ico HTTP/2.0”
and “GET / HTTP/2.0”