update docker files and logging for webui operation
This commit is contained in:
@@ -1,9 +1,9 @@
|
|||||||
# TODO: investigate using -alpine in the future
|
# TODO: investigate using -alpine in the future
|
||||||
FROM python:3.11
|
FROM python:3.11-bookworm
|
||||||
|
|
||||||
# Install system dependencies and poetry
|
# Install system dependencies and poetry
|
||||||
RUN apt-get update && apt-get install -y \
|
RUN apt-get update && apt-get install -y \
|
||||||
iputils-ping \
|
iputils-ping portaudio19-dev\
|
||||||
&& apt-get clean \
|
&& apt-get clean \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
services:
|
services:
|
||||||
multicaster:
|
multicaster:
|
||||||
container_name: multicaster-test
|
container_name: multicaster
|
||||||
privileged: true # Grants full access to all devices (for serial access)
|
privileged: true # Grants full access to all devices (for serial access)
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
ports:
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
|
services:
|
||||||
multicaster:
|
multicaster:
|
||||||
container_name: multicast-webapp
|
container_name: multicast-webapp
|
||||||
privileged: true # Grants full access to all devices (for serial access)
|
privileged: true # Grants full access to all devices (for serial access)
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
network_mode: service:wireguard
|
|
||||||
ports:
|
ports:
|
||||||
- "8501:8501"
|
- "8501:8501"
|
||||||
build:
|
build:
|
||||||
@@ -11,7 +11,8 @@
|
|||||||
- default=~/.ssh/id_ed25519 #lappi
|
- default=~/.ssh/id_ed25519 #lappi
|
||||||
#- default=~/.ssh/id_rsa #raspi
|
#- default=~/.ssh/id_rsa #raspi
|
||||||
volumes:
|
volumes:
|
||||||
- "/dev/serial:/dev/serial"
|
- "/dev/serial:/dev/serial"
|
||||||
|
- "/dev/snd:/dev/snd"
|
||||||
#devices:
|
#devices:
|
||||||
# - /dev/serial/by-id/usb-ZEPHYR_Zephyr_HCI_UART_sample_81BD14B8D71B5662-if00
|
# - /dev/serial/by-id/usb-ZEPHYR_Zephyr_HCI_UART_sample_81BD14B8D71B5662-if00
|
||||||
environment:
|
environment:
|
||||||
@@ -19,5 +20,5 @@
|
|||||||
|
|
||||||
# start the server and the frontend
|
# start the server and the frontend
|
||||||
command: >
|
command: >
|
||||||
python ./auracast/multicast_server.py & streamlit run ./auracast/server/multicast_frontend.py
|
bash -c "python ./auracast/server/multicast_server.py & streamlit run ./auracast/server/multicast_frontend.py"
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# frontend/app.py
|
# frontend/app.py
|
||||||
from itertools import filterfalse
|
import os
|
||||||
import streamlit as st
|
import streamlit as st
|
||||||
import requests
|
import requests
|
||||||
from auracast import auracast_config
|
from auracast import auracast_config
|
||||||
@@ -240,6 +240,6 @@ else:
|
|||||||
# st.error("Could not fetch advertised streams.")
|
# st.error("Could not fetch advertised streams.")
|
||||||
|
|
||||||
log.basicConfig(
|
log.basicConfig(
|
||||||
level=log.DEBUG,
|
level=os.environ.get('LOG_LEVEL', log.DEBUG),
|
||||||
format='%(module)s.py:%(lineno)d %(levelname)s: %(message)s'
|
format='%(module)s.py:%(lineno)d %(levelname)s: %(message)s'
|
||||||
)
|
)
|
||||||
@@ -362,7 +362,7 @@ async def shutdown():
|
|||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
import uvicorn
|
import uvicorn
|
||||||
log.basicConfig(
|
log.basicConfig(
|
||||||
level=log.DEBUG,
|
level=os.environ.get('LOG_LEVEL', log.DEBUG),
|
||||||
format='%(module)s.py:%(lineno)d %(levelname)s: %(message)s'
|
format='%(module)s.py:%(lineno)d %(levelname)s: %(message)s'
|
||||||
)
|
)
|
||||||
uvicorn.run(app, host="0.0.0.0", port=5000)
|
uvicorn.run(app, host="0.0.0.0", port=5000)
|
||||||
Reference in New Issue
Block a user