How do you set up Inventree in Cloud with Postgresql and https? #6125
-
I've been trying to setup having both postgresql and https (let's encrypt) and cannot find a good way to do this. I have tried two methods, docker and bare metal and get stuck in both cases. Docker is easy to get working with postgresql as it is the default. I like this method, but cannot seem to figure out how to add certbot with let's encrypt. It isn't obvious to me how to change the docker compose files to do this. It seems to not want to create the cert. If there is a pointer on how to do this, it would be great. I am doing this on an AWS EC2 instance. So in this case I can get things working without https, which I'm not willing to do with using this application. A pointer to an example would be great that is known to work. Or ... Next I tried the bare metal. I do the by hand install as version 13 fails at the moment. I get inventree working with sqlite3 and also I can get https working fine with let's encrypt. (I use some of the pointers in this discussion thread to get it done). The issue is when I try to change the config.yaml file with appropriate Posgresql changes, I can't seem to get the server to work. So what are the best steps to bring up a different database once the standard sqlite3 setup is complete? Basically I update /etc/inventree/config.yaml to use Postegresql. Then what are you supposed to do? If I do the following:
I also tried to put the file in /etc/inventree/config.yaml and do a from scratch install of 12.8 with apt. This fails as well. I was thinking that maybe it used the config.yaml file as it was already there. I'm not sure it is an issue here, but it is trying to back up data. But since nothing has been created yet, it fails. What is the correct command for bare metal at this point? It would be good to see a way to create a production server any pointers would be welcome. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
One way to handle certificates and renewal is to use a reverse proxy, for example Traefik. It has plugins for most DNS providers, and is made to communicate with other Docker containers through labels. First time I heard of it I thought "uhh, sounds complicated" - but once you get the hang of it, it makes sense. And it makes life easier if you have many containers on the same host. |
Beta Was this translation helpful? Give feedback.
One way to handle certificates and renewal is to use a reverse proxy, for example Traefik. It has plugins for most DNS providers, and is made to communicate with other Docker containers through labels.
First time I heard of it I thought "uhh, sounds complicated" - but once you get the hang of it, it makes sense. And it makes life easier if you have many containers on the same host.