fix: works with latest debian-based self-hosted image from vendor #9

Open
pharaohgraphy wants to merge 1 commits from fix-recipe into master

Description

This PR aims to get InvoiceNinja working again, I've followed their self-hosting new Debian-based image compose file super-closely to get it working.

Issues

It's working really well, but anytime I restart the container or restart my server, it starts erroring.

The first error is Nginx 502 Bad gateway, and when I look at the Nginx logs this is what I see:

[error] 33#33: *9 connect() failed (111: Connection refused) while connecting to upstream, client: 10.0.1.6, server: _, request: "GET / HTTP/1.1", upstream: "fastcgi://10.0.1.2:9000", host: "invoice.maat.systems"

Then the app shows the following error, which I believe to be the culprit itself, but no clue how to resolve it:

PDO::connect(): php_network_getaddresses: getaddrinfo for db failed: Name or service not known

I have checked the compose file over a dozen times, and ensured the DB_HOST & container name match to the value db, at this stage I have no idea why it does that, and if I undeploy & re-deploy the app via Abra, then it works 🤷

# Description This PR aims to get InvoiceNinja working again, I've followed their [self-hosting new Debian-based image compose file](https://github.com/invoiceninja/dockerfiles/tree/debian) super-closely to get it working. # Issues It's working really well, but anytime I restart the container or restart my server, it starts erroring. The first error is Nginx 502 Bad gateway, and when I look at the Nginx logs this is what I see: > [error] 33#33: *9 connect() failed (111: Connection refused) while connecting to upstream, client: 10.0.1.6, server: _, request: "GET / HTTP/1.1", upstream: "fastcgi://10.0.1.2:9000", host: "invoice.maat.systems" Then the `app` shows the following error, which I believe to be the culprit itself, but no clue how to resolve it: > PDO::connect(): php_network_getaddresses: getaddrinfo for db failed: Name or service not known I have checked the compose file over a dozen times, and ensured the `DB_HOST` & container name match to the value `db`, at this stage I have no idea why it does that, and if I undeploy & re-deploy the app via Abra, then it works 🤷
pharaohgraphy self-assigned this 2026-01-24 07:37:53 +00:00
pharaohgraphy added 1 commit 2026-01-24 07:37:54 +00:00
pharaohgraphy reviewed 2026-01-24 07:42:01 +00:00
@ -5,2 +5,3 @@
SECRET_API_SECRET_VERSION=v1
# Run this anywhere to generate a key:
# `docker run --rm -it invoiceninja/invoiceninja-debian php artisan key:generate --show`
Author
Owner

This will be moved to the README later once I fix the current issue

This will be moved to the README later once I fix the current issue
@ -1 +1,4 @@
export NGINX_CONF_VERSION=v1
export NGINX_LARAVEL_CONF_VERSION=v1
export NGINX_INVOICENINJA_CONF_VERSION=v2
Author
Owner

Will also reset this to v1

Will also reset this to `v1`
@ -27,3 +29,3 @@
- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLForceHost=true"
- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLHost=${DOMAIN}"
- coop-cloud.${STACK_NAME}.web.version=1.20.0-c1e6c074
- coop-cloud.${STACK_NAME}.web.version=xx # @TODO fix me
Author
Owner

This also needs to be fixed

This also needs to be fixed
@ -58,0 +84,4 @@
- nordigen_key
deploy:
labels:
- "coop-cloud.${STACK_NAME}.app=true" # Abra won't let me NOT have labels for 'app'?
Author
Owner

This one is weird... do I need to keep it? I kept getting a linting error from Abra without it 🤷

This one is weird... do I need to keep it? I kept getting a linting error from Abra without it 🤷
@ -62,2 +99,3 @@
db:
image: "mariadb:10.6"
image: mariadb:12
Author
Owner

I know the guide says to use mysql but I saw that we use mariadb as a drop-in replacement and that works fine for other apps👌

I know the guide says to use `mysql` but I saw that we use `mariadb` as a drop-in replacement and that works fine for other apps👌
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin fix-recipe:fix-recipe
git checkout fix-recipe
Sign in to join this conversation.
No description provided.