inventree / InvenTree

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

required variable INVENTREE_DB_USER is missing a value: You must provide the 'INVENTREE_DB_USER' variable in the .env file #7946

Closed kozmotronik closed 2 months ago

kozmotronik commented 2 months ago

Deployment Method

Describe the problem*

I am trying to install Inventree as per the instructions in Docker Install page. The installation is stuck at the Initial database setup step. I have already installed the required files to a working directory called Inventree-setup and I am executing the docker compose run --rm inventree-server invoke update command in this working directory. I have also set the required env variables as following:

INVENTREE_EXT_VOLUME=/disk/Depo/Envanter/Inventree

# DB user parameters
INVENTREE_DB_USER=ismail
INVENTREE_DB_PASSWORD=gecicisifre

I am keep getting required variable INVENTREE_DB_USER is missing a value: You must provide the 'INVENTREE_DB_USER' variable in the .env file error even though I have set the mentioned variables. Why does this happen? I can't progress in the installation because of this.

Steps to Reproduce

Same steps as in Docker Installation guide.

Relevant log output

$ docker compose run --rm inventree-server invoke update
WARN[0000] The "INVENTREE_EXT_VOLUME" variable is not set. Defaulting to a blank string.
WARN[0000] The "INVENTREE_EXT_VOLUME" variable is not set. Defaulting to a blank string.
WARN[0000] The "INVENTREE_EXT_VOLUME" variable is not set. Defaulting to a blank string.
WARN[0000] The "INVENTREE_EXT_VOLUME" variable is not set. Defaulting to a blank string.
WARN[0000] The "INVENTREE_EXT_VOLUME" variable is not set. Defaulting to a blank string.
WARN[0000] The "INVENTREE_EXT_VOLUME" variable is not set. Defaulting to a blank string.
WARN[0000] The "INVENTREE_EXT_VOLUME" variable is not set. Defaulting to a blank string.
error while interpolating services.inventree-db.environment.[]: required variable INVENTREE_DB_USER is missing a value: You must provide the 'INVENTREE_DB_USER' variable in the .env file
kozmotronik commented 2 months ago

Uuupss!!! How silly of me! Sorry guys, it was my bad.

The problem was the .env file's name. Since I downloaded it from browser, the browser has renamed it automatically removing the dot from the beginning and resulting name was env. That's why the program couldn't find the file hence assumed the variables to be blank.

Obviously the solution was renaming the file to its original name .env so that the program can find it.