File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 11"""Gunicorn configuration file."""
22import socket
3+ from os import environ , path
4+ from dotenv import load_dotenv
35
4- from config import Config
6+ basedir = path .abspath (path .dirname (__file__ ))
7+ load_dotenv (path .join (basedir , ".env" ))
8+
9+ ENVIRONMENT = environ .get ("ENVIRONMENT" )
510
611proc_name = "flaskassets"
712wsgi_app = "wsgi:app"
813bind = "unix:flask.sock"
914threads = 4
1015workers = 2
1116
12- if Config . ENVIRONMENT == "development" :
17+ if ENVIRONMENT == "development" :
1318 reload = True
1419 workers = 1
1520 threads = 1
1621
17-
18- if Config .ENVIRONMENT == "production" :
22+ if ENVIRONMENT == "production" :
1923 daemon = True
2024 accesslog = "/var/log/flaskassets/access.log"
2125 errorlog = "/var/log/flaskassets/error.log"
You can’t perform that action at this time.
0 commit comments