- Create
.env
from.evn example
; - Update the data in
.env
A secret key should be as random as possible. Your operating system has ways to generate pretty random data based on a cryptographic random generator. Use the following command to quickly generate a value for FLASK_SECRET_KEY
:
python -c 'import secrets; print(secrets.token_hex())'
You need to create a file recipients.json
with the data template in the root folder
[
{
"id": 1,
"phone": "+380987654321",
"name": "John"
},
{
"id": 2,
"phone": "+380123456789",
"name": "Jane"
},
{
"id": 3,
"phone": "+380918273645",
"name": "Jack"
},
{
"id": 4,
"phone": "+380192837465",
"name": "Jill"
}
]
The program is created to edit the recipients.json
file.
In docker, the recipients.json
file is used by volume, it can be used in other code.
I am using code as an admin to change message recipients. I have a script that sends messages to recipients in the recipients.json
file
cd admin
flask run --debug
docker compose -f docker/docker-compose.yml up -d