InvenTree icon indicating copy to clipboard operation
InvenTree copied to clipboard

Need help to setup caddy reverse proxy + docker setup

Open gab696 opened this issue 1 year ago • 2 comments

Deployment Method

  • [ ] Installer
  • [ ] Docker Development
  • [x] Docker Production
  • [ ] Bare metal Development
  • [ ] Bare metal Production
  • [ ] Digital Ocean image
  • [ ] Other (please provide a link Steps to Reproduce

Describe the problem*

Hi, I run a Docker setup on a Linux Ubuntu 24.04 machine (inventree 0.17.1) My network as already a server and forwaring ports set to point a NAS from the outside I can't setup the docker inventree install with a working SSL certificate.

Steps to Reproduce

server as a static ip address

192.168.2.15

DNS A record is set on my domain provider

inventree.xxx.com

In the .env file:

INVENTREE_SITE_URL="https://inventree.xxx.com"

Caddy file.

[!IMPORTANT] Should I change something ?

Port forwardings: On my network I already have set port forwarding pointing to my NAS (80,443)

setting this variable without the secure https and forwarding port 8001 to 80 on the server 192.168.2.15 point the inventree login page but the site is not secure: INVENTREE_SITE_URL="http://inventree.xxx.com"

can I check caddy logs on docker ?

Should I change inventree ports ?

Please could you help me ? Thanks !

Relevant log output


gab696 avatar Jan 07 '25 22:01 gab696

@gab696 this seems very similar to the example setup in this blog post - https://inventree.org/blog/2024/03/13/docker

Setting the INVENTREE_SITE_URL=https://inventree.xxx.com should be sufficient - do this and then look at the output of the various docker containers to see where the error lies.

With this setup, what are you seeing when you try to navigate to https://inventree.xxx.com?

SchrodingersGat avatar Jan 08 '25 01:01 SchrodingersGat

I cannot get private IP on Caddy to work properly with HTTPS. It does work good on public IP on Caddy.

For local setup, I switch Caddy with Nginx. Everything works fine.

jankins avatar Jan 24 '25 03:01 jankins