Okay, as you might imagine, I am very excited to tell you....
I GOT IT WORKING in that unraid container... Below are the (rough?) steps I followed.
Please keep in mind that I am JUST teaching myself docker and have never used invoiceninja. I figured this out through research and massive tweaking and troubleshooting. But that does not mean I cannot help you through your issues. 🙂
If you want to discuss this with me, or drop in and say thank you, I can be found in IRC on the FreeNode network in #DesktopMasters. Just comment and idle and I will respond to you when I am no longer idle. (We have a pretty incredible network of techs sharing their knowledge through multiple platforms.)
or.. just leave a note here and let me/us know if it worked!!
Search apps for: invoiceninja anojht
[Install]
Configure with your network settings.
Fill in settings.
Note: On the APP_URL remove the "https://" prefix. It can cause weird redirect loops on the forwarding if it is there.
Note: on the APP_KEY leave blank you will fill this in after.
Add Variable: REQUIRE_HTTPS
Key: REQUIRE_HTTPS
Value: false
^^ Not sure if this does anything at all.
[APPLY] settings.
In the below picture it does not show it but I later changed
port 8000 to 80
and
port 8443 to 443
(This following is the missing step)
Go into console of running container...
Run the following commands
php artisan key:generate
# ^^ remember you have to type "yes"
php artisan config:clear
php artisan config:cache
Now copy the key on your screen from the first command from between the brackets without the brackets: base64:PbmLdQrTYfcSDJSLKDALDKFFvvq/yWaGlfwiNAvjHXQ= (The left key is an example do not use it)
Past it into the APP_KEY field you previously left blank in the settings of the container. (replace whatever text is there now)
[APPLY]
After this I was able to access it on port 8000 through my NGinX forwarded proxy (if that does not work try 80). I was able to make it use 80 and 443 by editing the settings and advanced settings but for the sake of this and leaving defaults I did not do it on my final run and it worked on 8000. I later changed it to 80 to do my port forwarding. It worked on 8000 for a while then stopped. No idea why.
After setting up I could not access it on 8000 directly and it would always to try redirect me to https. Also the login screen looked strange. This happened NO MATTER what I did. however... Whenever I access it through my web server proxy with the ssl certs it looks and works perfectly.
This is my NGinX web server config....
server {
server_name billing.desktopmasters.com;
location / {
proxy_pass http://invoiceninja:443/;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
client_max_body_size 100m;
client_body_buffer_size 128k;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffer_size 4k;
proxy_buffers 4 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;
}
listen 443 ssl; # managed by Certbot
# ssl off;
ssl_certificate /etc/ssl/private/desktopmasters.com/fullchain1.pem; # managed by Certbot
ssl_certificate_key /etc/ssl/private/desktopmasters.com/privkey1.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
# And of course for redirect from port 80 to ssl/443
server {
server_name billing.desktopmasters.com;
listen 80;
if ($host = billing.desktopmasters.com) {
return 301 https://$host$request_uri;
}
return 404;
}
~ The Father