|
| 1 | +# Important notes regarding this .env-file: |
| 2 | +# |
| 3 | +# - For more information about .env-files, please see |
| 4 | +# https://smartmob-rfc.readthedocs.io/en/latest/2-dotenv.html |
| 5 | +# |
| 6 | +# - Use blank lines for spacing. |
| 7 | +# |
| 8 | +# - Comments start with # and always start beginning-of-line (BOL). |
| 9 | +# Inline comments are NOT supported and will break the syntax. |
| 10 | +# |
| 11 | +# - Place your secrets and passwords here, but do not commit this file back to any repository. |
| 12 | +# Also avoid transmitting these secrets to other people in plain-text. |
| 13 | +# |
| 14 | +# - Most python-interpreter related env-variables will need to be set/sourced *before* the python-interpreter starts |
| 15 | +# Reading them via sitecustomize.py comes too late, since the python-process has already started. |
| 16 | +# |
| 17 | +# - Use bash-compatible variable-assigment-syntax: FOO='BAR' |
| 18 | +# To preserve bash-compatibility, never use spaces around the equal-operator, so don't use FOO = 'BAR'. |
| 19 | +# Always single-quote the values to preserve the literal value of each character. For example if a |
| 20 | +# password contains backslashes, those should be treated as literal values, and not as escape-characters |
| 21 | +# like when double-quoting. So always use FOO='BAR', not FOO=BAR nor FOO="BAR". |
| 22 | +# TODO: docker breaks when using quotes. |
| 23 | +# |
| 24 | +# - Standard env-variables only support string-types. However in python we can easily parse strings into |
| 25 | +# other types like lists. For example FOO='BAR|BAZ', we can string-parse into FOO=["BAR", "BAZ"]. |
| 26 | +# |
| 27 | +# - In bash, you can directly source this file to load all these env-var in your current bash-session: |
| 28 | +# >>> set -a && source .env && set +a |
| 29 | +# Usability-tip: Add following alias to your ~/.bashrc |
| 30 | +# >> alias source-env='set -a && source .env && set +a' |
| 31 | + |
| 32 | +PROJECT_NAME='libranet_django' |
| 33 | +BASE_DIR="__CWD__" |
| 34 | +IPYTHONDIR="__CWD__/etc/ipython" |
| 35 | +PYTHONSTARTUP="__CWD__/etc/pythonstartup.py" |
| 36 | + |
| 37 | +# caching |
| 38 | +CACHE_DIR="__CWD__/var/cache/" |
| 39 | +BLACK_CACHE_DIR="__CWD__/var/cache/black" |
| 40 | +IPYTHON_CACHE_DIR="__CWD__/var/cache/ipython" |
| 41 | +MYPY_CACHE_DIR="__CWD__/var/cache/mypy" |
| 42 | +PRE_COMMIT_HOME="__CWD__/var/cache/pre-commit" |
| 43 | +PYLINTHOME="__CWD__/var/cache/pylint" |
| 44 | + |
| 45 | +# debugging |
| 46 | +# used by python-interpreter, cfr. https://docs.python.org/3/using/cmdline.html#environment-variables |
| 47 | +# used by ipdb / remote-pdb - cfr https://pypi.org/project/remote-pdb + cfr https://pypi.org/project/ipdb |
| 48 | +# PYTHONBREAKPOINT='pdb.set_trace' |
| 49 | +PYTHONBREAKPOINT='ipdb.set_trace' |
| 50 | + |
| 51 | +# show headers in urllib3-http-connections |
| 52 | +DEBUGLEVEL_HTTPCONNECTION='1' |
| 53 | + |
| 54 | +# tmp |
| 55 | +TMP="__CWD__/var/tmp" |
| 56 | +TMPDIR="__CWD__/var/tmp" |
| 57 | +TEMP="__CWD__/var/tmp" |
| 58 | + |
| 59 | +# libranet-logging - etc/logging.yaml |
| 60 | +# Supported values for logging, from lowest to highest priority: |
| 61 | +# LOGLEVEL_XXX: NOTSET|TRACE|DEBUG|INFO|WARNING|ERROR |
| 62 | +LOGGING_YML_FILE="__CWD__/etc/logging.yaml" |
| 63 | +LOG_DIR="__CWD__/var/log" |
| 64 | +PYTHON_CONSOLE_FORMATTER='console_color' |
| 65 | +LOGLEVEL_ROOT='NOTSET' |
| 66 | +LOGLEVEL_ASYNCIO='NOTSET' |
| 67 | +LOGLEVEL_BLIB2TO3='INFO' |
| 68 | + |
| 69 | +LOGLEVEL_DJANGO='NOTSET' |
| 70 | +LOGLEVEL_DJANGO_DB_BACKENDS='NOTSET' |
| 71 | + |
| 72 | +LOGLEVEL_libranet_django='NOTSET' |
| 73 | +LOGLEVEL_HTTP_CLIENT='DEBUG' |
| 74 | +LOGLEVEL_LIBRANET_LOGGING='INFO' |
| 75 | +LOGLEVEL_MULTIPART='INFO' |
| 76 | +LOGLEVEL_PARSO='INFO' |
| 77 | +LOGLEVEL_PY_WARNINGS='NOTSET' |
| 78 | +LOGLEVEL_REQUESTS='NOTSET' |
| 79 | +LOGLEVEL_REQUESTS_PACKAGES_URLLIB3='NOTSET' |
| 80 | +LOGLEVEL_URLLIB3='NOTSET' |
| 81 | +LOGLEVEL_URLLIB3_CONNECTIONPOOL='NOTSET' |
| 82 | +LOGLEVEL_URLLIB3_UTIL_RETRY='NOTSET' |
| 83 | +PYTHONASYNCIODDEBUG='1' |
| 84 | +LOG_HANDLERS="console|debug_file|info_file|warning_file|error_file" |
| 85 | +PYTHON_ENABLE_LOGGING_TREE=0 |
| 86 | + |
| 87 | + |
| 88 | + |
| 89 | +# django |
| 90 | +DJANGO_ALLOWED_HOSTS='127.0.0.1|localhost|libranet-django' |
| 91 | +DJANGO_BASE_URL='https://example.com' |
| 92 | +DJANGO_DEBUG='1' |
| 93 | +DJANGO_SECRET_KEY='__DJANGO_SECRET_KEY__' |
| 94 | +DJANGO_SETTINGS_MODULE='libranet_django.settings' |
| 95 | +GUNICORN_CMD_ARGS='--bind=0.0.0.0:5000 --workers=2 --reload' |
| 96 | +WAGTAILADMIN_BASE_URL='https://example.com' |
| 97 | + |
| 98 | +# serve app via uvicorn, see https://www.uvicorn.org/settings/ |
| 99 | +UVICORN_PORT='8000' |
| 100 | +UVICORN_HOST='0.0.0.0' |
| 101 | +UVICORN_RELOAD='1' |
| 102 | + |
| 103 | + |
| 104 | + |
0 commit comments