add gunicorn to requirements

This commit is contained in:
mst 2024-09-23 16:17:42 +03:00
parent 6a79c1a4b5
commit 2de8464766
3 changed files with 27 additions and 0 deletions

8
gunicorn.conf.py Normal file
View file

@ -0,0 +1,8 @@
import os
from dotenv import load_dotenv
for env_file in ('.env', '.flaskenv'):
# make a .env path
env = os.path.join(os.getcwd(), env_file)
# if .env path exists, load .env file
if os.path.exists(env):
load_dotenv(dotenv_path=env)

18
install.sh Executable file
View file

@ -0,0 +1,18 @@
#!/usr/bin/bash
commit="git rev-parse --short HEAD"
bold=$(tput bold)
normal=$(tput sgr0)
echo "--------------------------"
echo "${bold}Installing CatAsk (commit ${commit})...${normal}"
echo "--------------------------"
echo 'Creating & activating virtual environment...'
python3 -m venv venv && . venv/bin/activate
echo 'Installing required packages...'
pip install -r requirements.txt
cp .env.example .env; cp config.example.json config.json
read -n 1 -s -r -p "Press any key to open main config file"
nano config.json
read -n 1 -s -r -p "Press any key to open .env config file"
nano .env

View file

@ -6,3 +6,4 @@ mistune
bleach
pathlib
Flask-Compress
gunicorn