Hi:
I was just trying to get this running to test features of it. Was following the documentation here:
Docker, for setting it up with docker.
Went through steps in: Free Source Available Invoicing, Expenses & Time-Tracking | Invoice Ninja
sudo docker run -d -v /var/mariadb:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=“tst” -e MYSQL_DATABASE=ninja -e MYSQL_USER=ninja -e MYSQL_PASSWORD=ninja -p 3306:3306 mariadb:latest
sudo docker run -d -v /var/invoiceninja/public:/var/app/public -v /var/invoiceninja/storage:/var/app/storage -e APP_ENV=‘production’ -e APP_DEBUG=0 -e APP_URL=‘http://localhost’ -e APP_KEY=‘t16Mxke4fUMKSEOHeMHU22SN4w4QGpVAcmJ2cUku9wk=’ -e APP_CIPHER=‘AES-256-CBC’ -e DB_TYPE=‘mysql’ -e DB_STRICT=‘false’ -e DB_HOST=‘’ -e DB_DATABASE=‘ninja’ -e DB_USERNAME=‘ninja’ -e DB_PASSWORD=‘ninja’ -p ‘80:80’ invoiceninja/invoiceninja
$telnet 3306
Trying …
Connected to .
Escape character is ‘^]’.
i
11.1.2-MariaDB-1:11.1.2+maria~ubu2204
cmz<[7>o��-:pEI|Y%L2Q"Umysql_native_password
Docker logs on the invoiceninja container shows no errors.
I’ve tried this with docker compose on my actual serverstack, and didn’t get anywhere. Finally ran it with docker run commands on my desktop. Same issue, container is up. Not reachable via port 80 (simple test excluding reverse proxy)
$ sudo docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
d5c5dfa2873c invoiceninja/invoiceninja “docker-entrypoint s…” 3 minutes ago Up 3 minutes 0.0.0.0:80->80/tcp, :::80->80/tcp, 9000/tcp relaxed_satoshi
ed2f8392166a mariadb:latest “docker-entrypoint.s…” 5 minutes ago Up 5 minutes 0.0.0.0:3306->3306/tcp, :::3306->3306/tcp zealous_shockley
sudo netstat -antp | grep LISTEN | grep 80
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 22785/docker-proxy
tcp6 0 0 :::80 :::* LISTEN 22797/docker-proxy
sudo netstat -antp | grep LISTEN | grep 3306
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 20755/docker-proxy
tcp6 0 0 :::3306 :::* LISTEN 20766/docker-proxy
sudo docker logs -f 88d52f3096dc
2023-10-18T04:16:17Z [INFO] [Entrypoint]: Initialising Invoice Ninja…
INFO Configuration cached successfully.
INFO Caching the framework bootstrap files.
config … 21ms DONE
routes … 48ms DONE
INFO Discovering packages.
imdhemy/laravel-purchases … DONE
intervention/image … DONE
invoiceninja/inspector … DONE
laravel/slack-notification-channel … DONE
laravel/socialite … DONE
laravel/tinker … DONE
laravel/ui … DONE
livewire/livewire … DONE
nesbot/carbon … DONE
nunomaduro/termwind … DONE
nwidart/laravel-modules … DONE
sentry/sentry-laravel … DONE
socialiteproviders/manager … DONE
spatie/laravel-data … DONE
turbo124/beacon … DONE
webpatser/laravel-countries … DONE
INFO Nothing to migrate.
2023-10-18 04:16:19,956 WARN For [program:php-fpm], redirect_stderr=true but stderr_logfile has also been set to a filename, the filename has been ignored
2023-10-18 04:16:19,956 WARN For [program:scheduler], redirect_stderr=true but stderr_logfile has also been set to a filename, the filename has been ignored
2023-10-18 04:16:19,956 WARN For [program:queue-worker], redirect_stderr=true but stderr_logfile has also been set to a filename, the filename has been ignored
2023-10-18 04:16:19,956 WARN For [program:queue-worker], redirect_stderr=true but stderr_logfile has also been set to a filename, the filename has been ignored
2023-10-18 04:16:19,957 INFO supervisord started with pid 1
2023-10-18 04:16:20,961 INFO spawned: ‘shutdown’ with pid 61
2023-10-18 04:16:20,963 INFO spawned: ‘php-fpm’ with pid 62
2023-10-18 04:16:20,964 INFO spawned: ‘queue-worker_00’ with pid 63
2023-10-18 04:16:20,966 INFO spawned: ‘queue-worker_01’ with pid 64
2023-10-18 04:16:20,967 INFO spawned: ‘scheduler’ with pid 65
READY
[18-Oct-2023 04:16:21] NOTICE: [pool www] ‘user’ directive is ignored when FPM is not running as root
[18-Oct-2023 04:16:21] NOTICE: [pool www] ‘user’ directive is ignored when FPM is not running as root
[18-Oct-2023 04:16:21] NOTICE: [pool www] ‘group’ directive is ignored when FPM is not running as root
[18-Oct-2023 04:16:21] NOTICE: [pool www] ‘group’ directive is ignored when FPM is not running as root
[18-Oct-2023 04:16:21] NOTICE: fpm is running, pid 62
[18-Oct-2023 04:16:21] NOTICE: ready to handle connections
2023-10-18 04:16:22,008 INFO success: shutdown entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2023-10-18 04:16:22,008 INFO success: php-fpm entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2023-10-18 04:16:22,008 INFO success: queue-worker_00 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2023-10-18 04:16:22,008 INFO success: queue-worker_01 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2023-10-18 04:16:22,008 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.
What am I doing wrong?
Any information or guidence that could be provided to point me in the right direction would be most appreciated.
Hi,
Have you made any changes to the docker file?
This video may help: https://www.youtube.com/watch?v=xo6a3KtLC2g&t=399s&ab_channel=DBTech
https://hub.docker.com/r/invoiceninja/invoiceninja/
makes it look like all the parameters can be specified (and that only a few are needed to be non-default) on the cli via env vars.
When I was doing my testing with docker compose, I was doing some custom stuff, so I’m disreguarding that setup. I’m just working with the pure docker run commands 1 for the db and one for the app:
sudo docker run -d -v /var/mariadb:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=“tst” -e MYSQL_DATABASE=ninja -e MYSQL_USER=ninja -e MYSQL_PASSWORD=ninja -p 3306:3306 mariadb:latest
sudo docker run -d -v /var/invoiceninja/public:/var/app/public -v /var/invoiceninja/storage:/var/app/storage -e APP_ENV=‘production’ -e APP_DEBUG=0 -e APP_URL=‘http://localhost’ -e APP_KEY=‘t16Mxke4fUMKSEOHeMHU22SN4w4QGpVAcmJ2cUku9wk=’ -e APP_CIPHER=‘AES-256-CBC’ -e DB_TYPE=‘mysql’ -e DB_STRICT=‘false’ -e DB_HOST=‘’ -e DB_DATABASE=‘ninja’ -e DB_USERNAME=‘ninja’ -e DB_PASSWORD=‘ninja’ -p ‘80:80’ invoiceninja/invoiceninja
Is running invoiceninja via the docker run command no longer a valid way to start up the application?
Thanks
DB_HOST does have a value (the IP of the desktop running mysql), the message text got stripped out
I would suggest using the docker-compose file in the repo.
This is the only way that I have run the application using docker.
I’ve never run the app using the standalone image.