inventree / InvenTree

Open Source Inventory Management System
https://docs.inventree.org
MIT License
4.34k stars 786 forks source link

Docker - Caddy only showing Demo site #8504

Closed bcdaus closed 1 day ago

bcdaus commented 5 days ago

Deployment Method

Describe the problem*

I have been running Inventree in Docker since v13.8 (Currently at 16.7) but after some recent login looping which was not resolved with the INVENTREE_COOKIE_SAMESITE=FALSE entry I decided it was probably time to create a new Docker instance now things like Caddy are involved. I have a postgresql server with all my data on another box so though it would be a quick fix. When I follow the guide and bring up the new instance, on hitting the Inventree IP I get a webpage telling me that Caddy is running as the web server but that is all.

I am running the Stable Docker instance and pulled down the .env, docker_compose.yaml and Caddy config from the 'Stable Docs' part of the Inventree Doc web site.

Any clues on where to look? Running on Ubuntu 20.04.06

Steps to Reproduce

Folow guide at : https://docs.inventree.org/en/stable/start/docker_install/#docker-installation Modify .env file to point to Postgresql server and setup admin user as per previous install. set INVENTREE_WEB_PORT=80 Set INVENTREE_SITE_URL=https://Machine FQDN (can be resolved on local network) Set INVENTREE_SERVER=https://192.168.1.170 run Docker Compose up -d - everything comes up cleanly Hit IP or FQDN address - Caddy Webserver is working page. Hit IP or FQDN :443 and get a connection refused message.

Relevant log output

bill@Joshua-NUC:~/Inventree_Docker$ sudo docker compose up -d
[+] Running 6/6
 ✔ Network inventree_default   Created                                     0.0s
 ✔ Container inventree-cache   Started                                     0.7s
 ✔ Container inventree-db      Started                                     0.6s
 ✔ Container inventree-server  Started                                     0.9s
 ✔ Container inventree-worker  Started                                     1.3s
 ✔ Container inventree-proxy   Started                                     1.2s
bill@Joshua-NUC:~/Inventree_Docker$ sudo ss -ltn
State   Recv-Q   Send-Q     Local Address:Port      Peer Address:Port  Process
LISTEN  0        5              127.0.0.1:631            0.0.0.0:*
LISTEN  0        4096       127.0.0.53%lo:53             0.0.0.0:*
LISTEN  0        128              0.0.0.0:22             0.0.0.0:*
LISTEN  0        4096             0.0.0.0:80             0.0.0.0:*
LISTEN  0        4096           127.0.0.1:27217          0.0.0.0:*
LISTEN  0        4096             0.0.0.0:443            0.0.0.0:*
LISTEN  0        4096             0.0.0.0:5432           0.0.0.0:*
LISTEN  0        100                    *:8043                 *:*
LISTEN  0        100                    *:8088                 *:*
LISTEN  0        100                    *:8843                 *:*
LISTEN  0        128                 [::]:22                [::]:*
LISTEN  0        4096                [::]:80                [::]:*
LISTEN  0        5                  [::1]:631               [::]:*
LISTEN  0        4096                [::]:443               [::]:*
LISTEN  0        1024                   *:29816                *:*
LISTEN  0        1024                   *:29813                *:*
LISTEN  0        1024                   *:29812                *:*
LISTEN  0        1024                   *:29815                *:*
LISTEN  0        1024                   *:29814                *:*
LISTEN  0        1024                   *:29811                *:*
LISTEN  0        4096                [::]:5432              [::]:*
bill@Joshua-NUC:~/Inventree_Docker$
matmair commented 3 days ago

INVENTREE_SERVER will need to be the name of the docker container with the server - only change if you changed the docker container name

SchrodingersGat commented 1 day ago

Set INVENTREE_SERVER=https://192.168.1.170/

The INVENTREE_SERVER is the internal address to the docker container which is running the actual InvenTree code. It is not exposed to the outside world. This should not be changed from the default value. Is there a reason you are changing this?

bcdaus commented 1 day ago

I had misread the Caddy config and though this had to be changed to suit my install. I am going to re-create the docker configs and try again. Thanks for your help bill