python3 venv -m my_env
source my_env/bin/activate
pip3 install -r requirements.txt
- FLASK_DEBUG
- DATABASE_URL
- SECRET_KEY
- ADMIN_USER_NAME
- ADMIN_PASSWORD
- ADMIN_EMAIL
- MAIL_SERVER
- MAIL_POR
- MAIL_USE_SSL
- MAIL_USE_TLS
- MAIL_USERNAME
- MAIL_PASSWORD
- UPLOAD_FOLDER
- RECAPTCHA_PUBLIC_KEY
- RECAPTCHA_PRIVATE_KEY
-
The variables prefixed
ADMIN
are for the moderator,MAIL
are configurations for email verification, and the last two prefixed withRECAPTCHA
are for recaptcha purposes. -
You can set environment variables in two ways;
-
Inside the terminal, as follows
export DATABASE_URL=your_database_url
-
You can check if the environment variable has been set or not by using the keyword
echo
- Create a
.env
file - Set the environment variables here in similar way to the above
- Use Python's
os
library to get variables.