Avoid daphne No module named 'asgiref.compatibility' https://github.com/django/daphne/issues/256
@@ -0,0 +1,13 @@
+"""
+ASGI entrypoint. Configures Django and then runs the application
+defined in the ASGI_APPLICATION setting.
+
+import os
+import django
+from channels.routing import get_default_application
+os.environ.setdefault("DJANGO_SETTINGS_MODULE", "desktop.settings")
+django.setup()
+application = get_default_application()
@@ -19,7 +19,7 @@ spec:
- name: daphne-websocket
image: {{ .Values.image.registry }}/hue:{{ .Values.image.tag }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
- command: ['./build/env/bin/daphne', '-p', '8001', 'core.asgi:application']
+ command: ['./build/env/bin/daphne', '-p', '8001', 'desktop.asgi:application']
resources:
requests:
# memory: "64Mi"
@@ -26,6 +26,10 @@ spec:
serviceName: hue-balancer
servicePort: 80
path: /
+ - backend:
+ serviceName: daphne-websocket
+ servicePort: 8001
+ path: /(ws/.*)
{{- range .Values.ingress.extraHosts }}
- host: {{ . | quote }}
http:
@@ -2,10 +2,10 @@
apiVersion: v1
kind: Service
metadata:
- name: dahpne-websocket
+ name: daphne-websocket
spec:
selector:
- pod: dahpne-websocket
+ pod: daphne-websocket
ports:
- port: 8001
type: ClusterIP