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 1
1
"""Gunicorn configuration file."""
2
2
import socket
3
+ from os import environ , path
4
+ from dotenv import load_dotenv
3
5
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" )
5
10
6
11
proc_name = "flaskassets"
7
12
wsgi_app = "wsgi:app"
8
13
bind = "unix:flask.sock"
9
14
threads = 4
10
15
workers = 2
11
16
12
- if Config . ENVIRONMENT == "development" :
17
+ if ENVIRONMENT == "development" :
13
18
reload = True
14
19
workers = 1
15
20
threads = 1
16
21
17
-
18
- if Config .ENVIRONMENT == "production" :
22
+ if ENVIRONMENT == "production" :
19
23
daemon = True
20
24
accesslog = "/var/log/flaskassets/access.log"
21
25
errorlog = "/var/log/flaskassets/error.log"
You can’t perform that action at this time.
0 commit comments