Skip to content

Commit

Permalink
Updating references in run script
Browse files Browse the repository at this point in the history
  • Loading branch information
simonwarchol committed Jan 13, 2023
1 parent b1822cf commit 8859ffb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion minerva_analysis/client/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
</div>
</li>
<li class="nav-item">
{% if is_docker %}
{% if data.is_docker %}
<a id="navbarUpload" class="nav-link" href="http://localhost:8080/upload_page">Upload</a>
{% else %}
<a id="navbarUpload" class="nav-link" href="/upload_page">Upload</a>
Expand Down
17 changes: 10 additions & 7 deletions run.py
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)

0 comments on commit 8859ffb

Please sign in to comment.