-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b1822cf
commit 8859ffb
Showing
2 changed files
with
11 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,24 @@ | ||
import sys | ||
|
||
from waitress import serve | ||
|
||
from minerva_analysis import app | ||
import multiprocessing | ||
import sys | ||
|
||
if __name__ == '__main__': | ||
#use port 8000 if no port is specified via command line argument | ||
# use port 8000 if no port is specified via command line argument | ||
port = 8000 if len(sys.argv) < 2 or not str.isdigit(sys.argv[1]) else sys.argv[1] | ||
|
||
|
||
def str2bool(v): | ||
return v.lower() in ("yes", "true", "t", "1") | ||
if len(sys.argv) > 2 or not str2bool(sys.argv[2]): | ||
|
||
|
||
if len(sys.argv) > 2 and str2bool(sys.argv[2]): | ||
is_docker = True | ||
else: | ||
is_docker = False | ||
app.config['IS_DOCKER'] = is_docker | ||
|
||
|
||
print('Serving on 0.0.0.0:' + str(port) + ' or http://localhost:' + str(port) ) | ||
serve(app, host='0.0.0.0', port=port, max_request_body_size=1073741824000000, max_request_header_size=85899345920000) | ||
print('Serving on 0.0.0.0:' + str(port) + ' or http://localhost:' + str(port)) | ||
serve(app, host='0.0.0.0', port=port, max_request_body_size=1073741824000000, | ||
max_request_header_size=85899345920000) |