InvoicePlane in a Docker container - custom templates

InvoicePlane 1.7.2
Docker 29.1.3

I am contemplating moving my InvoicePlane instances off the hosted server they are currently on, and running them from a Docker container on a USB drive. I am using the funktionslust/invoiceplane:latest image. Possibly my question(s) are better aimed at the image maintainer, but here I am.

To this end I have 1.7.2 configured and running. And I have restored and upgraded one of my production databases for testing. And all appears to be as it should be.

I’m currently stuck trying to get some custom invoice templates installed.

I am aware that 1.7.2 has at least one new environment variable that need to be configured - CUSTOM_INVOICE_TEMPLATES_PDF.

And I’m also imagining that somehow Docker needs to know where the custom templates reside outside the container.

I’m looking at docker-entrypoint.sh that is part of the image, and cannot see this variable being processed, or anything else that looks like it would be involved with custom templates. Reading the Docker log output by this file tends to support this.

I’m a newbie when it comes to Docker. And have no idea how, or even if it is possible, to write my template files into the image directory structure. And I suspect that even if I could, I’d still be stuck trying to get the environment variables set.

I’ve spent some time searching the web. And have allowed myself to be sucked into an AI rabbit warren - which has been a bit of a time sink :slight_smile: And while I’ve learned some stuff about docker, I haven’t really got anywhere as far as this issue goes.

Can anyone point me in the right direction?

1 Like

Well, it’s a good question.
InvoicePlane itself has at least 2 images built in its repository.

I’ll point to them in a second.
This repository: GitHub - mhzawadi/invoiceplane: InvoicePlane is a self-hosted open source application for managing your invoices, clients and payments. · GitHub has always been doing great in keeping up.

Back to InvoicePlane/InvoicePlane

There is an original docker-compose.yml and someone has made up a compose.yml where you stuff everything you need in 1 Dockerfile.
That single Dockerfile has an entrypoint.sh

Well, it’s a good question.
InvoicePlane itself has at least 2 images built in its repository.

I’ll point to them in a second.
This repository: GitHub - mhzawadi/invoiceplane: InvoicePlane is a self-hosted open source application for managing your invoices, clients and payments. · GitHub has always been doing great in keeping up.

Back to InvoicePlane/InvoicePlane

There is an original docker-compose.yml and someone has made up a compose.yml where you stuff everything you need in 1 Dockerfile.
That single Dockerfile has an [entrypoint.sh](https://github.com/InvoicePlane/InvoicePlane/blob/develop/resources/docker/entrypoint.sh) which sets up those paths and variables

And that’s only needed when you have custom template names.

It’s smart to use the custom path to the Invoice and Quote templates because no-one can guess that

The term, in my opinion for your AI rabbit-hole is “volume” and “bind-mounts”.
if you store your custom templates on /var/custom/templates/ then you want to tell your compose.yml about it: whenever you start yourself, bind /var/custom/templates to the running Docker container

1 more promotion:
GitHub - InvoicePlane/InvoicePlane-Docker · GitHub was made if you want to run lots and lots of projects at the same time.
For example InvoicePlane v1 and v2.

Those other systems are more for a 1-click no-hassle solution

Thank you, UnderDog.

Early in the process, I had looked at mhzawadi/invoiceplane on GitHub. And I thought it was 7 years out of date. I can now clearly see that this is not the case. I can see that the required variables are handled in start.sh, so this looks promising. I am away for a few days now, and will have a better look at it in a few days time.

1 Like

mhzawadi/invoiceplane is the best maintained image, in my honest opinion, next to the images from InvoicePlane itself.

I haven’t looked at that image funktionslust/invoiceplane:latest, so maybe i’m a bit biased

I have returned to this. I am now using mhzawadi/invoiceplane and have it up and running. I will do further testing, but it appears to be working as it should be. The configuration of the custom templates was straightforward enough. And I’ve learned a bit about docker containers.

I’ve been out of IT for nearly 6 years after a 37 - or so - year career. I now remember why I gave it away :slight_smile:

Thank you for your assistance :pray:

1 Like