Fix Docker setup
This commit is contained in:
+3
-1
@@ -12,6 +12,8 @@ RUN pip3 install --no-cache-dir -r requirements.txt
|
||||
|
||||
COPY . .
|
||||
|
||||
ENV FLASK_APP="main.py"
|
||||
|
||||
EXPOSE 5000
|
||||
|
||||
CMD [ "python", "main.py"]
|
||||
CMD [ "python3", "main.py"]
|
||||
+3
-2
@@ -21,6 +21,7 @@ from app.models import *
|
||||
# Import routing to render the pages
|
||||
from app.views import *
|
||||
|
||||
db.create_all()
|
||||
with webapp.app_context():
|
||||
db.create_all()
|
||||
|
||||
webapp.run()
|
||||
webapp.run(host="0.0.0.0", port=5000)
|
||||
@@ -83,7 +83,7 @@ class HomeAssistant(object):
|
||||
|
||||
def get_defaults(self):
|
||||
domains = self.get_domains()
|
||||
domain = domains[0].domain_id
|
||||
domain = list(domains.values())[0].domain_id
|
||||
services = self.get_services(domain)
|
||||
service = services[0].service_id
|
||||
entities = self.get_entities(domain)
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
<p>
|
||||
<label for="domain">Domain</label><br>
|
||||
<select name="domain" id="domain-select" onchange="getDomainData();">
|
||||
{% for domain in domains %}
|
||||
<option value="{{ domain.domain_id }}" {% if domain.domain_id == callback.domain %}selected{% endif %}>{{ domain.domain_id }}</option>
|
||||
{% for domain in domains.keys() %}
|
||||
<option value="{{ domain }}" {% if domain == callback.domain %}selected{% endif %}>{{ domain }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</p>
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
from html import entities
|
||||
from flask import redirect, render_template, request, url_for, flash
|
||||
from grpc import services
|
||||
|
||||
from datetime import time
|
||||
|
||||
|
||||
Reference in New Issue
Block a user