Help with InvoiceNinja docker?


cyberspectre

Recommended Posts

Just now, IronBeardKnight said:

man I'm having so much trouble with this container 

 

.env trick then get chown  error for it in the setup page, so chow whole app directory as the ,env does not exist anymore. Wooo hoo one sep further.

then straight up after submit on setup page straight up 500 error. and so many errors in the logs 

 

 child 37 said into stderr: "src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\Cookie\Middleware\EncryptCookies->handle(Object(Illuminate\Http\Request), Object(Closure)) #36

 

etc etc. 

would be so good if this worked properly. Not sure why this container self generates ssl cert through lets encrypt but most people running the container will be using reverse proxies anyway.

tried editing in  GEN_SSL but it just completely breaks the container.

Link to comment
  • 1 month later...
1 hour ago, newillusions said:

Sorry for resurrecting a zombie, but did anyone manage to get a v5 install running?
Would love to keep using this on my home server rather than migrating to the remote web one.

@newillusions I'm running v4.5.37.
Unfortunately anojht/invoiceninja repository only has 4.x version so for v5 I think we'd have to create a whole different Docker image since anojht doesn't have issues enabled for the repository unfortunately :( 
After a quick Google search I realized that upgrading involves creating a whole new install, and using the migration tool. I'd be willing to create a different repo for this, would you have time to help me test?

 

@IronBeardKnight sorry for being late to the party, but in case it's still relevant: what error did you get when trying to disable GEN_SSL?

Link to comment
  • 5 weeks later...

@Benjamin Picard yes, it's beta-ish. I will create another post for it, but did not have time. @newillusions helped me test it so far, and only the export doesn't work from v5, but there is a fix for that which I didn't have time yet to include into the Docker image yet. I will later tonight.

For now it's not official in UnRAID, so to install it you have to add this url in Docker -> (Scroll down) -> Template Repositories and click Save:

https://github.com/kiwimato/invoiceninja_v5

 

After that you should be able to click "ADD CONTAINER" and then select "invoiceninjav5" from the templates, and the rest should be pretty similar how to setup v4.

You can find more info, including on how to migrate here:

https://github.com/kiwimato/invoiceninja_v5/blob/master/UnRAID.md#upgrade-from-v4-to-v5

 

One thing worth mentioning for which I didn't find a solution yet, is that you HAVE to import the self signed certificate in your browser if you don't somehow use LetsEncrypt to have proper certificates. For some reason even if I acknowledged the SSL error in the browser, some requests simply failed due to the bad cert. I think it was Chrome, so it might work in other browsers. Also disabling SSL with `REQUIRE_HTTPS=false` didn't seem to work for me, but if you find a way, please let me know so we can update the documentation :)

 

Feel free to PM if you have any questions or issues

Edited by Mihai
updated links
  • Like 2
  • Thanks 1
Link to comment

@Mihai Hey thank you for that work on getting invoiceninja to work on unraid without any issues. Would it be possible to keep it updated to latest v5-stable, since invoiceninja is @ 5.2.x and this is on an older 5.1.x version? 

 

Thanks again for the work 

Link to comment

@Mihai Thanks for that, could you also make sure you run php artisan migrate:status or php artisan migrate, it might be another command but whichever it is to properly do any DB updates prior to starting up because I am currently stuck on a loop and can't run it on the container since it fails to boot up services and crashes.

Edited by razor950
Link to comment
  • 2 weeks later...

Having a very strange issue. Currently I have it running fine for the most part. I can access the app via the local IP and port (192.168.1.21:8443) and it loads fine. I CANNOT access it via the domain set up in NPM (invoice.example.com) on a machine that is on the same network as the server hosting it. I CAN access it via the domain on a machine that is not on the same network, so if I VPN or remote into my home machine, the domain works fine. Any idea as to why that might be?

Link to comment
  • 2 months later...

Hi Thanks for the container.
I managed to get this container (anojht/invoiceninja) to work but, It won't be possible for me to RP this as long as the container has syntax settings for auto https with self signed cert. 

Would it be possible to remove the self signed cert in the container & change the config so it works over http?

 

(local http broken) 

788761011_httpwrk.thumb.png.e26a8b314873c32b1f88a0fb0a29153b.png

 

(local https working perfect)

https.thumb.png.e02a701c9a0007b64fd90c257efc3280.png

Edited by Zidichy
Link to comment

@Zidichy In my experience I was not able to fully turn off https in invoiceninja successfully, regardless of much I tried. Even if you only serve HTTP, somehow invoiceninja frontend will send some connections over HTTPS making it fail.
But maybe there's a setting I didn't find yet, so if you find a way, please teach me how. Regardless, it's not wise to turn off encryption, especially for sensitive data like this even if you're in some internal network. For this reason, I recommend importing the self generated SSL certificate in your browser as a trusted certificate, and it should fix your problem.

 

I recommend giving v5 a try since you have a new install, mentioned in this comment. However, this too will come with the same SSL issues if you're not using SWAG or anything like that to get a LetsEncrypt certificate which is trusted by your browser. I will create a separate support thread for v5 this week as soon as I have enough free time.

Edited by Mihai
Link to comment
19 hours ago, Mihai said:

@Zidichy In my experience I was not able to fully turn off https in invoiceninja successfully, however much I tried. Even if you only serve HTTP, somehow invoiceninja frontend will send some connections over HTTPS making it fail.
But maybe there's a settings I didn't find yet, so if you find a way, please teach me how. Regardless, it's not wise to turn off encryption, especially for sensitive data like this even if you're in some internal network. For this reason, I recommend importing the self generated SSL certificate in your browser as a trusted certificate, and it should fix your problem.

 

I recommend giving v5 a try since you have a new install, mentioned in this comment. However, this too will come with the same SSL issues if you're not using SWAG or anything like that to get a LetsEncrypt certificate which is trusted by your browser. I will create a separate support thread for v5 this week as soon as I have enough free time.

 

If i find a way i will let you know. Usually i would agree with you when it comes to encryption, but not in this case.

I am actually using swag, and i get my LE cert's from swag container so i was planing on doing a reverse proxy just like i do for many of my other applications.

The way the config is for invoiceninja container will make it very hard to reverse proxy to my domain. Perhaps it would be possible to symlink the cert from swag to invoiceninja, but i'll have to test that later.

I was planing on trying v5 when it's released.


Update.
Scratch that, I got it working with reverse proxy,

and symlinks would not have worked on local.

Edited by Zidichy
added info
Link to comment

If you set SSL_CERT and SSL_KEY vars with the content of the cert, then you can use Letsencrypt certs, but I agree this is not the best option since cycling them makes it cumbersome.

v5 mentioned in the above comment should work good enough, actually there are 4 people as far as I know using it at this point and all don't have any issues with it so far. The v5 one also has a better way of controling the certs: you can just copy them over as mentioned here.

 

In any case, I recommend talking in PM for any new issues to avoid spamming all the people in this thread.

Link to comment

Well i couldn't sleep so i worked on my reverse proxy.conf for the invoiceninja container,

and i managed to get it working.

 

I also bashed into the invoiceninja container in cd /var/www/app and added following to the .env file

_env.png.9b0513d578d240c91ed773e70d2c1107.png

 

Getting a few header errors in my console but it's just header issues & I'm pretty sure I can fix that tomorrow.

Access to manifest at... &  

has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header has a value 'domain' that is not equal to the supplied origin

 

Damn now I want this themed, hope GilbN has plans for theming invoiceninja xD


If anyone wants the reverse proxy.conf i'll add it here.

Please note that i use Organizr as my http authentication so you gotta comment that out if this does not work for you.

# Invoiceninja Reverse Proxy
## Version 2021/09/13

server {
	listen 443 ssl http2;
	listen [::]:443 ssl http2;
	server_name invoice.*;

# Custom Error Pages
	include /config/nginx/errorpages.conf;

# Organizr Authentication
	include /config/nginx/auth.conf;

# Maxmind Geographic IP Block
#	include /config/nginx/geoblock.conf;

# SSL Settings
	include /config/nginx/ssl.conf;

	location / {
		auth_request /auth-0;
		proxy_pass http://IP:PORT/;
		proxy_set_header Host $http_host;
		proxy_set_header X-Real-IP $remote_addr;
		proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
		proxy_set_header X-Forwarded-Proto $scheme;
		proxy_set_header X-Forwarded-Host $http_host;
	}
}

 

 

Edited by Zidichy
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.