-
Notifications
You must be signed in to change notification settings - Fork 0
/
.env.template
116 lines (108 loc) · 4.47 KB
/
.env.template
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# Important notes regarding this .env-file:
#
# - For more information about .env-files, please see
# https://smartmob-rfc.readthedocs.io/en/latest/2-dotenv.html
#
# - Place your secrets and passwords here, but do not commit this file back to any repository.
# Also avoid transmitting these secrets to other people in plain-text.
#
# - Use blank lines for spacing.
#
# - Comments start with # and always start beginning-of-line (BOL).
# Inline comments are NOT supported and will break the syntax.
#
# - Use bash-compatible variable-assigment-syntax: FOO='BAR'
# To preserve bash-compatibility, never use spaces around the equal-operator, so don't use FOO = 'BAR'.
# Always single-quote the values to preserve the literal value of each character. For example if a
# password contains backslashes, those should be treated as literal values, and not as escape-characters
# like when double-quoting. So always use FOO='BAR', not FOO=BAR nor FOO="BAR".
# TODO: docker breaks when using quotes.
#
# - Standard env-variables only support string-types. However in python we can parse strings into other types
# like lists. For example FOO='BAR|BAZ', we can string-parse into FOO=["BAR", "BAZ"].
#
# - In bash, you can directly source this file to load all these env-var in your current bash-session:
# >>> set -a && source .env && set +a
# Usability-tip: Add following alias to your ~/.bashrc
# >> alias source-env='set -a && source .env && set +a'
#
# - Most python-interpreter related env-variables will need to be set/sourced *before* the python-interpreter starts
# Reading them via read_dotenv in sitecustomize.py comes too late, since the process has already started.
# used in makefile to create the venv
PYTHON_VERSION="3.11.2"
### project- directory-structure ###
# use double quotes if you use this in variable subsitutions
BASE_DIR="__CWD__"
PROJECT_NAME='demo-flask'
# PYTHON_LOG_DIR="__CWD__/var/log"
LOGGING_YML_FILE="__CWD__/etc/logging.yml"
IPYTHONDIR="__CWD__/etc/ipython"
PYTHONSTARTUP="__CWD__/etc/pythonstartup.py"
CACHE_DIR="__CWD__/var/cache/"
DATA_DIR="__CWD__/var/data/"
DOWNLOAD_DIR="__CWD__/var/download/"
IPYTHONDIR="__CWD__/etc/ipython"
IPYTHON_CACHE_DIR="__CWD__/var/cache/ipython"
# MYPY_CACHE_DIR="__CWD__/var/cache/mypy"
PYLINTHOME="__CWD__/var/cache/pylint"
LOG_DIR="__CWD__/var/log"
TMP="__CWD__/var/tmp"
TMPDIR="__CWD__/var/tmp"
TEMP="__CWD__/var/tmp"
TEMPDIR="__CWD__/var/tmp"
### Flask ###
FLASK_APP='libranet_flask.main:create_app()'
FLASK_ENV='DEVELOPMENT'
FLASK_DEBUG='1'
# skip dotenv to avoid loading twice
FLASK_SKIP_DOTENV='1'
# The secret key is used to sign the session cookie.
# If you replace the key and restart your app, the existing sessions will be invalidated.
SECRET_KEY='__SECRET_KEY__'
# auto-reload app when extra files have changed
FLASK_RUN_EXTRA_FILES="__CWD__/.env"
# click-command bin/flask run
FLASK_RUN_PORT=5000
FLASK_RUN_HOST='0.0.0.0'
GUNICORN_CMD_ARGS="--bind=0.0.0.0:5000 --workers=2 --reload"
# Run FastAPI via uvicorn, see https://www.uvicorn.org/settings/
UVICORN_PORT='8000'
UVICORN_HOST='0.0.0.0'
UVICORN_RELOAD='1'
# Turn on global debugging for the HTTPConnection class,
# doing so will cause debug messages to be printed to STDOUT
DEBUGLEVEL_HTTPCONNECTION='1'
### logging - used in the logging.yml ###
# Supported values for logging, from lowest to highest priority:
# LOGLEVEL_XXX: NOTSET|TRACE|DEBUG|INFO|WARNING|ERROR
PYTHON_CONSOLE_FORMATTER='console_color'
LIBRANET_LOGGING_SEPARATOR='|'
LOG_HANDLERS="console|debug_file|info_file|warning_file|error_file"
LOGLEVEL_ROOT='NOTSET'
LOGLEVEL_ASYNCIO='NOTSET'
LOGLEVEL_BLIB2TO3='INFO'
LOGLEVEL_FLASK_CORS='NOTSET'
LOGLEVEL_GUNICORN='NOTSET'
LOGLEVEL_HTTP_CLIENT='NOTSET'
LOGLEVEL_HTTPCORE='NOTSET'
LOGLEVEL_HTTPX='NOTSET'
LOGLEVEL_LIBRANET_FLASK='NOTSET'
LOGLEVEL_LIBRANET_LOGGING='INFO'
LOGLEVEL_PARSO='INFO'
LOGLEVEL_PY_WARNINGS='NOTSET'
LOGLEVEL_REQUESTS='NOTSET'
LOGLEVEL_REQUESTS_PACKAGES_URLLIB3='NOTSET'
LOGLEVEL_RPY2='NOTSET'
LOGLEVEL_URLLIB3='NOTSET'
LOGLEVEL_URLLIB3_CONNECTIONPOOL='NOTSET'
LOGLEVEL_URLLIB3_UTIL_RETRY='NOTSET'
LOGLEVEL_UVICORN='NOTSET'
LOGLEVEL_UVICORN_ACCESS='NOTSET'
LOGLEVEL_UVICORN_ERROR='NOTSET'
LOGLEVEL_WATCHFILES='INFO'
LOGLEVEL_WERKZEUG='NOTSET'
### debugging ###
# used by python-interpreter, cfr. https://docs.python.org/3/using/cmdline.html#environment-variables
# used by ipdb / remote-pdb - cfr https://pypi.org/project/remote-pdb + cfr https://pypi.org/project/ipdb
# PYTHONBREAKPOINT='pdb.set_trace'
PYTHONBREAKPOINT='ipdb.set_trace'