Skip to content

Commit d663ae3

Browse files
committed
Update Python version; resolve gunicorn config errors.
1 parent 6d2addc commit d663ae3

File tree

5 files changed

+430
-1444
lines changed

5 files changed

+430
-1444
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Flask-SQLAlchemy Tutorial
22

3-
![Python](https://img.shields.io/badge/Python-v^3.10-blue.svg?logo=python&longCache=true&logoColor=white&colorB=5e81ac&style=flat-square&colorA=4c566a)
3+
![Python](https://img.shields.io/badge/Python-v^3.12-blue.svg?logo=python&longCache=true&logoColor=white&colorB=5e81ac&style=flat-square&colorA=4c566a)
44
![Flask](https://img.shields.io/badge/Flask-v3.0.3-blue.svg?longCache=true&logo=flask&style=flat-square&logoColor=white&colorB=5e81ac&colorA=4c566a)
55
![Flask-SQLAlchemy](https://img.shields.io/badge/Flask--SQLAlchemy-3.1.1-red.svg?longCache=true&style=flat-square&logo=flask&logoColor=white&colorA=4c566a&colorB=5e81ac)
66
![GitHub Last Commit](https://img.shields.io/github/last-commit/google/skia.svg?style=flat-square&colorA=4c566a&colorB=a3be8c)

gunicorn.conf.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,19 @@
1111
# Fetch deployment environment from environment variables.
1212
ENVIRONMENT = environ.get("ENVIRONMENT")
1313

14-
proc_name = "flasksession"
14+
proc_name = "flasksqlalchemy"
1515
wsgi_app = "wsgi:app"
16-
bind = "unix:flask.sock"
17-
threads = 4
16+
bind = ["127.0.0.1:8009"]
17+
threads = 2
1818
workers = 2
19+
access_log_format = "%(h)s %(l)s %(u)s %(t)s %(r)s %(s)s %(b)s %(f)s %(a)s"
1920

2021
if ENVIRONMENT == "development" or ENVIRONMENT is None:
2122
reload = True
2223
workers = 1
2324
threads = 1
24-
bind = ["127.0.0.1:8000"]
2525
elif ENVIRONMENT == "production":
26-
daemon = True
27-
accesslog = "/var/log/flasksqlalchemy/access.log"
28-
errorlog = "/var/log/flasksqlalchemy/error.log"
29-
loglevel = "trace"
30-
dogstatsd_tags = "env:prod,service:flasksqlalchemy,language:python"
26+
accesslog = "/var/log/flasksqlalchemy/access.json"
27+
errorlog = "/var/log/flasksqlalchemy/error.json"
3128
else:
3229
raise ValueError(f"Unknown environment provided: `{ENVIRONMENT}`. Must be `development` or `production`.")

0 commit comments

Comments
 (0)