Environment variables

Dotenv files

Since PyFunceble 2.0.0 (equivalent of PyFunceble >=1.18.0), we load (thanks to python-dotenv) the content of the following files into the (local) list of environment variables.

  1. .env (current directory)
  2. .env (configuration directory)
  3. .pyfunceble-env (configuration directory)

To quote the python-dotenv documentation, a .env should look like the following:

# a comment and that will be ignored.

What do we use and why ?

Here is the list of environment variables we use and how we use them if they are set.

Environment Variable How do we use it?
PYFUNCEBLE_AUTO_CONFIGURATION Tell us if we have to install/update the configuration file automatically.
PYFUNCEBLE_DB_CHARSET Tell us the MySQL charset to use.
PYFUNCEBLE_DB_HOST Tell us the host of the MySQL database.
PYFUNCEBLE_DB_NAME Tell us the name of the MySQL database to use.
PYFUNCEBLE_DB_PASSWORD Tell us the MySQL user password to use.
PYFUNCEBLE_DB_PORT Tell us the MySQL connection port to use.
PYFUNCEBLE_DB_USERNAME Tell us the MySQL user-name to use.
PYFUNCEBLE_CONFIG_DIR Tell us the location of the directory to use as the configuration directory.
PYFUNCEBLE_OUTPUT_DIR Same as PYFUNCEBLE_CONFIG_DIR it’s just present for retro-compatibility.
APPDATA Used under Windows to construct/get the configuration directory if PYFUNCEBLE_CONFIG_DIR is not found.
TRAVIS_BUILD_DIR Used to confirm that we are running under a Travis CI container.