mirror of
https://github.com/lucaspalomodevelop/eventcally.git
synced 2026-03-13 00:07:22 +00:00
gunicorn config
This commit is contained in:
parent
f1066409b9
commit
3200e77925
2
Procfile
2
Procfile
@ -1,2 +1,2 @@
|
||||
release: flask db upgrade
|
||||
web: gunicorn project:app --log-file=-
|
||||
web: gunicorn -c gunicorn.conf.py project:app
|
||||
|
||||
14
README.md
14
README.md
@ -31,10 +31,12 @@ psql -c 'create database gsevpt;' -U postgres
|
||||
### Install and run
|
||||
|
||||
```sh
|
||||
export DATABASE_URL="postgresql://postgres@localhost/gsevpt"
|
||||
pip install -r requirements.txt
|
||||
flask db upgrade
|
||||
gunicorn --bind 0.0.0.0:5000 project:app
|
||||
python3 -m venv venv
|
||||
source venv/bin/activate
|
||||
(venv) pip install -r requirements.txt
|
||||
(venv) export DATABASE_URL='postgresql://postgres@localhost/gsevpt'
|
||||
(venv) flask db upgrade
|
||||
(venv) gunicorn -c gunicorn.conf.py --bind 0.0.0.0:5000 project:app
|
||||
```
|
||||
|
||||
## Scheduled/Cron jobs
|
||||
@ -61,8 +63,8 @@ Create `.env` file in the root directory or pass as environment variables.
|
||||
|
||||
| Variable | Function |
|
||||
| --- | --- |
|
||||
| SECRET_KEY | A secret key for verifying the integrity of signed cookies. Generate a nice key using secrets.token_urlsafe(). |
|
||||
| SECURITY_PASSWORD_HASH | Bcrypt is set as default SECURITY_PASSWORD_HASH, which requires a salt. Generate a good salt using: secrets.SystemRandom().getrandbits(128). |
|
||||
| SECRET_KEY | A secret key for verifying the integrity of signed cookies. Generate a nice key using `python3 -c "import secrets; print(secrets.token_urlsafe())"`. |
|
||||
| SECURITY_PASSWORD_HASH | Bcrypt is set as default SECURITY_PASSWORD_HASH, which requires a salt. Generate a good salt using: `python3 -c "import secrets; print(secrets.SystemRandom().getrandbits(128))"`. |
|
||||
|
||||
### Send notifications via Mail
|
||||
|
||||
|
||||
@ -7,4 +7,4 @@ do
|
||||
done
|
||||
|
||||
BIND_PORT=${PORT:-5000}
|
||||
gunicorn --bind 0.0.0.0:$BIND_PORT project:app
|
||||
gunicorn -c gunicorn.conf.py --bind 0.0.0.0:$BIND_PORT project:app
|
||||
|
||||
5
gunicorn.conf.py
Normal file
5
gunicorn.conf.py
Normal file
@ -0,0 +1,5 @@
|
||||
import multiprocessing
|
||||
|
||||
workers = multiprocessing.cpu_count() * 2 + 1
|
||||
capture_output = True
|
||||
errorlog = "-"
|
||||
Loading…
x
Reference in New Issue
Block a user