New Docker Image Available

A new Dockerfile based on Debian is now the default for new docker based installations.

The new image allows us to have much better multi lingual support, and it also provides access to advanced extensions such as Saxon (for xslt2 processing).

The image is bigger than the alpine one, but the tradeoffs is well worth it.

Going forward, I’ll continue to tag images for both the existing Dockerfile and the new one. So there is no need to do anything additional if you are happily using the current dockerfile.

There is no (easy) way to migrate between the two Docker versions. Migration would require copying the public/storage folder across the containers the mapping here has also changed slightly.

Old docker user files: app/public/storage

New docker user files: storage/app/public/storage

Your database would also need to be ported over.

2 Likes

Hi David. Thanks for your effort here.

I’ve spent a few hours trying to get the image working but unfortunately so far to no avail. Here’s a few observations:

  • Although it’s aliased, the syntax used in the documentation follows the long outdated Docker Compose standalone docker-compose instead of docker compose.
  • The command to generate an key before the containers have started doesn’t return a key, it just starts the container up.
  • The app starts ok, and is accessible via browser. However, if you try to upload a logo in place of the existing logo, the POST returns a 200 but the image will appear broken in the frontend. The image does upload to /storage/app/public/imagerand/imagevariant.png. My guess is that’s either the wrong directory or the mapping from the frontend (currently https://url.com/storage/imagerand/imagevariant.png) to the backend isn’t correct.
  • I get a combination of Axios 504 and 502 errors when trying use SnapPDF. The backend shows several pids forcefully terminated and at least one other pid exiting with an exit code of 1 (children fo the app container, not nginx).

I’ve tested behind a reverse proxy (Traefik) and also directly and the behaviour is the same.

Keen to get this set up, so if you need any more info from me or can suggest how I might be being stupid - please let me know.

2 Likes

@RapidScampi I guess I am a little old school and still use the docker-compose wrapper.

I believe there is a PR that will make the logo appear within the admin panel, which should resolve that particular issue.

I am not sure about the 504/502 errors, i would inspect the logs storage/logs/laravel for further information on that one my guess is traefik may not be playing nice.

The update today that changed the Nginx config bind mounts and switched out the PHP configs seems to have fixed the PDF generation issues. The only issue that it didn’t fix (at least that I’ve spotted) is the logo not appearing in the frontend after being uploaded.

It flashes up as 403 in the console so I manually set the permissions for the uploaded image’s dir to something more permissive from inside the container and this fixed the issue. Other uploaded files (attaching docs to invoices, for example) seem to work fine.

1 Like

Is there a manual for the migration-process from docker-compose- to docker-compose-image available, yet?

@Schmitti

I’m not sure i follow the question on this one. Did you want to move to the new debian docker image?

There would be no special migration process as such as we will continue to tag images for both versions.

Yes, moving to the new debian-image is my intention. You wrote – simplified – this image would be better than the alpine one. But since the migration-process is not simple, I’m looking forward to a procedure-manual.

The migration for this would be similar to a regular installation.

You could move the db to the new container.

The only other difference is we have moved the default file storage from

app/public/storage

to

app/storage/app/public/

So would need to copy the files/folders from the original container to this new location.

@david , oh well, this sounds pretty easy to me. :slight_smile: I’ll give it a try on a test-system and if everything went well I guess I will change.

Thank you for clearifying!

Hello @all,

is it save to use mariadb 10.4 for the debian-docker-image instead of mysql 8?

Greetings

Hi everyone — I’ve been self-hosting InvoiceNinja for a while now and I think it’s a great piece of software, thank you to everyone who works on it.

I recently updated my docker image using:

docker compose down
docker compose pull
docker compose up

Because I was facing a new error where my InvoiceNinja wouldn’t send emails, it said I needed a Hobby Plan? Even though I’ve been using it and sending emails for a while.

But after updating, I am encountering a 502 Gateway Error on nginx, the logs from my nginx container show:

/docker-entrypoint.sh: Configuration complete; ready for start up

2025/01/24 21:33:33 [notice] 1#1: using the "epoll" event method

2025/01/24 21:33:33 [notice] 1#1: nginx/1.27.3

2025/01/24 21:33:33 [notice] 1#1: built by gcc 13.2.1 20240309 (Alpine 13.2.1_git20240309) 

2025/01/24 21:33:33 [notice] 1#1: OS: Linux 6.8.12-4-pve

2025/01/24 21:33:33 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 524288:524288

2025/01/24 21:33:33 [notice] 1#1: start worker processes

2025/01/24 21:33:33 [notice] 1#1: start worker process 20

2025/01/24 21:33:33 [notice] 1#1: start worker process 21

192.168.0.17 - - [24/Jan/2025:21:33:52 +0000] "GET / HTTP/1.1" 502 552 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36" "-"

2025/01/24 21:33:52 [error] 21#21: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.0.17, server: _, request: "GET / HTTP/1.1", upstream: "fastcgi://172.18.0.4:9000", host: "192.168.0.34:8035"

2025/01/24 21:33:53 [error] 21#21: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.0.17, server: _, request: "GET / HTTP/1.1", upstream: "fastcgi://172.18.0.4:9000", host: "192.168.0.34:8035"

192.168.0.17 - - [24/Jan/2025:21:33:53 +0000] "GET / HTTP/1.1" 502 552 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36" "-"

192.168.0.17 - - [24/Jan/2025:21:33:54 +0000] "GET / HTTP/1.1" 502 552 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36" "-"

2025/01/24 21:33:54 [error] 21#21: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.0.17, server: _, request: "GET / HTTP/1.1", upstream: "fastcgi://172.18.0.4:9000", host: "192.168.0.34:8035"

192.168.0.17 - - [24/Jan/2025:21:33:55 +0000] "GET / HTTP/1.1" 502 552 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36" "-"

2025/01/24 21:33:55 [error] 21#21: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.0.17, server: _, request: "GET / HTTP/1.1", upstream: "fastcgi://172.18.0.4:9000", host: "192.168.0.34:8035"

2025/01/24 21:39:46 [error] 20#20: *6 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.0.17, server: _, request: "GET / HTTP/1.1", upstream: "fastcgi://172.18.0.4:9000", host: "192.168.0.34:8035"

192.168.0.17 - - [24/Jan/2025:21:39:46 +0000] "GET / HTTP/1.1" 502 552 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36" "-"

Would anyone be able to help please?

I’m not sure what you mean by “Hobby Plan”, it isn’t related to Invoice Ninja.

If you’d like help please create a new post with any related errors in storage/logs.

I had the same issue when I tried to migrate to the debian-image.

Apologies this was my stupid late night mistake — Hobby Plan was a message from Mailersend as I reached a limit on my account.

As for the errors after updating the docker image, I ended up reverting to the original for now, I did find some logs in the debian app:

cp: cannot stat '/image-original/public/*': No such file or directory
Cleaning up .js and .css files in public/ directory...
Copying public/ directory from image to volume...
cp: cannot stat '/image-original/public/*': No such file or directory
Cleaning up .js and .css files in public/ directory...
Copying public/ directory from image to volume...

That just kept repeating, I’ll figure it out once I have my backups sorted.

@a.rbsn

I see the issue, i’m tagging a new release .

1 Like

Thank you @david — really appreciate it

1 Like