|
1 | | -# Single secret key |
2 | | -# You must generate it like this as follows |
3 | | -# in order to use `cryptography` package: |
| 1 | +# Based on this file you can create your own |
| 2 | +# `.env.development` or `.env.production`. |
| 3 | +# Next will be described expected environment variables. |
| 4 | +# In final file you also can put any arbitrary environment variables |
| 5 | +# (for example, specific for Docker containers, app configuration, |
| 6 | +# external software configuration, etc.). |
| 7 | +# If some env variable shouldn't be presented, then just delete it. |
| 8 | +# "If you use docker image" means that you are using Docker locally, |
| 9 | +# through "docker" or "docker-compose". |
| 10 | + |
| 11 | + |
| 12 | +### Required |
| 13 | + |
| 14 | +# Single secret key. |
| 15 | +# Don't lose it, otherwise you will be not able to |
| 16 | +# interact with existing database. |
| 17 | +# You must generate it as follows in order |
| 18 | +# to use `cryptography` package: |
4 | 19 | # ``` |
5 | | -# from cryptography.fernet import Fernet |
6 | | -# key = Fernet.generate_key().decode() |
7 | | -# print(key) |
| 20 | +# python manage.py generate-secret-key |
8 | 21 | # ``` |
9 | 22 | FLASK_SECRET_KEY= |
10 | 23 |
|
11 | 24 | # Address of database. |
12 | | -# PostgreSQL is expected in production, but not required |
| 25 | +# PostgreSQL is expected in production, but not required. |
| 26 | +# For local SQLite you can specify a path. For example, |
| 27 | +# `sqlite:///development.sqlite` will put `development.sqlite` |
| 28 | +# in `src` folder (because relative to the app). |
13 | 29 | DATABASE_URL=postgresql+psycopg2://<user>:<password>@<host>:<port>/<db_name> |
14 | 30 |
|
15 | | -# Address of Redis server. Optional. |
| 31 | +# API token received from @BotFather for Telegram bot. |
| 32 | +TELEGRAM_API_BOT_TOKEN= |
| 33 | + |
| 34 | +# ID of app registerd in Yandex to access Yandex OAuth API. |
| 35 | +YANDEX_OAUTH_API_APP_ID= |
| 36 | + |
| 37 | +# Password of app registerd in Yandex to access Yandex OAuth API. |
| 38 | +YANDEX_OAUTH_API_APP_PASSWORD= |
| 39 | + |
| 40 | +### |
| 41 | + |
| 42 | + |
| 43 | +### Required if you use Postgres docker image |
| 44 | + |
| 45 | +# Name of user that will own DB. |
| 46 | +# Use this value in `DATABASE_URL`. |
| 47 | +POSTGRES_USER= |
| 48 | + |
| 49 | +# Password of user that will own DB. |
| 50 | +# Use this value in `DATABASE_URL`. |
| 51 | +POSTGRES_PASSWORD= |
| 52 | + |
| 53 | +# Name of DB that will store data. |
| 54 | +# Use this value in `DATABASE_URL`. |
| 55 | +POSTGRES_DB= |
| 56 | + |
| 57 | +### |
| 58 | + |
| 59 | + |
| 60 | +### Required if you use amaimersion/yd-tg-bot-rq docker image |
| 61 | + |
| 62 | +# Number of RQ workers that will handle background tasks. |
| 63 | +# Each worker can perform one task at a time. |
| 64 | +# Read RQ documentation to set appropriate value. |
| 65 | +# Keep in mind that each worker instance creates its own fork, |
| 66 | +# which means significant usage of your computer resources. |
| 67 | +# So, monitor usage of your computer resources. |
| 68 | +# Start with 2 or 3 if you don't sure what you need. |
| 69 | +RQ_WORKERS= |
| 70 | + |
| 71 | +### |
| 72 | + |
| 73 | + |
| 74 | +### Optional |
| 75 | + |
| 76 | +# Add postfix to final URL of Telegram webhook route. |
| 77 | +# For example, initially app uses `/webhook` URL. |
| 78 | +# You can set this variable to `_aslv123`. |
| 79 | +# And the app will use this URL `/webhook_aslv123`. |
| 80 | +TELEGRAM_API_WEBHOOK_URL_POSTFIX= |
| 81 | + |
| 82 | +# Address of Redis server. |
16 | 83 | # If address will be specified, then the app will assume |
17 | 84 | # that valid instance of Redis server is running, and the app |
18 | 85 | # will not make any checks (like `PING`). So, make sure you |
19 | 86 | # pointing to valid Redis instance. |
| 87 | +# If you want to point to Docker container that is placed |
| 88 | +# in the same network as the app container, then you should |
| 89 | +# use container DNS name. For example, `redis://redis-container:6379`. |
20 | 90 | REDIS_URL= |
21 | 91 |
|
22 | | -# API token received from @BotFather for Telegram bot |
23 | | -TELEGRAM_API_BOT_TOKEN= |
| 92 | +# Number of gunicorn workers. |
| 93 | +# Read gunicorn documentation to set appropriate value. |
| 94 | +# Use "-1" for "auto". |
| 95 | +# Keep in mind that each worker instance creates its own fork, |
| 96 | +# which means significant usage of your computer resources. |
| 97 | +# So, monitor usage of your computer resources. |
| 98 | +# Most likely you don't need high values. |
| 99 | +# Start with 1 or 2. |
| 100 | +GUNICORN_WORKERS= |
24 | 101 |
|
25 | | -# ID of app registerd in Yandex to access Yandex OAuth API |
26 | | -YANDEX_OAUTH_API_APP_ID= |
| 102 | +# Number of connections for each gunicorn worker. |
| 103 | +# Read gunicorn documentation to set appropriate value. |
| 104 | +GUNICORN_WORKER_CONNECTIONS= |
27 | 105 |
|
28 | | -# Password of app registerd in Yandex to access Yandex OAuth API |
29 | | -YANDEX_OAUTH_API_APP_PASSWORD= |
30 | | - |
31 | | -# Your UA for Google Analytics. Optional |
| 106 | +# Your UA for Google Analytics. |
| 107 | +# Google Analytics is used in some app components to collect |
| 108 | +# and analyze usage info. |
32 | 109 | GOOGLE_ANALYTICS_UA=UA-XXXX-X |
| 110 | + |
| 111 | +### |
0 commit comments