Skip to content

Commit bf05a9a

Browse files
committed
clean up some heroku stuff
1 parent bf8708e commit bf05a9a

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

.env-example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# replace this file with your own .env file.
2+
PORT=29999
23
NETDATAMLAPP_HOSTS=london.my-netdata.io
34
NETDATAMLAPP_SCRAPE_CHILDREN=no
45
NETDATAMLAPP_LOG_LEVEL=info

Dockerfile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,4 @@ COPY app.py ./
99
COPY index.py ./
1010

1111
ENV PORT=29999
12-
13-
#CMD [ "gunicorn", "--workers=2", "--threads=1", "-b 0.0.0.0:29999", "index:server"]
14-
1512
CMD gunicorn --workers=2 --threads=1 -b 0.0.0.0:$PORT index:server

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ __Netdata ML App__ - A collection of [dash](https://plotly.com/dash/) based pyth
66

77
This is all experimental and nowhere near stable yet, but you might find something interesting in your data so why not play around and see :)
88

9+
Click below to play with the latest version of the app, deployed to Heroku, configured to use data from our demo servers:
10+
11+
https://netdata-ml-app.herokuapp.com/
12+
913
### Apps
1014

1115
Each app focuses on a particular use case:

index.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
import dash_core_components as dcc
44
import dash_html_components as html
55
from dash.dependencies import Input, Output
6+
import os
7+
from dotenv import load_dotenv
8+
load_dotenv()
69

710
from app import app
811
from apps import (
@@ -74,4 +77,4 @@ def display_page(pathname):
7477

7578

7679
if __name__ == '__main__':
77-
app.run_server(port=29999)
80+
app.run_server(port=os.getenv('PORT', 29999))

0 commit comments

Comments
 (0)