Fix Docker setup

This commit is contained in:
2022-12-10 16:55:34 +01:00
parent ee3c2c9b0d
commit 01ec2af4c7
5 changed files with 9 additions and 7 deletions
+3 -1
View File
@@ -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
View File
@@ -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)
+1 -1
View File
@@ -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)
+2 -2
View File
@@ -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
View File
@@ -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