Add additional logging and use docker compose in host mode
This commit is contained in:
+11
-7
@@ -1,19 +1,23 @@
|
||||
services:
|
||||
app:
|
||||
multicaster:
|
||||
privileged: true # Grants full access to all devices (needed for serial access)
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "5000:5000"
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
ssh:
|
||||
- default=~/.ssh/id_ed25519 #lappi
|
||||
#- default=~/.ssh/id_rsa #raspi
|
||||
devices:
|
||||
- /dev/serial/by-id/usb-ZEPHYR_Zephyr_HCI_UART_sample_81BD14B8D71B5662-if00
|
||||
volumes:
|
||||
- "/dev/serial:/dev/serial"
|
||||
#devices:
|
||||
# - /dev/serial/by-id/usb-ZEPHYR_Zephyr_HCI_UART_sample_81BD14B8D71B5662-if00
|
||||
environment:
|
||||
LOG_LEVEL: INFO
|
||||
|
||||
# - DOCKER_BUILDKIT=1 # Enable BuildKit (can also be passed during build)
|
||||
#command: python ./auracast/multicast_server.py #devserver
|
||||
command: python ./auracast/multicast.py # continously streaming test app
|
||||
command: python ./auracast/multicast_server.py
|
||||
#command: python ./auracast/multicast.py # continously streaming test app
|
||||
|
||||
|
||||
# use docker compose up --build
|
||||
@@ -20,8 +20,10 @@ async def initialize(conf: auracast_config.AuracastConfigGroup):
|
||||
try:
|
||||
if conf.transport == 'auto':
|
||||
serial_devices = glob.glob('/dev/serial/by-id/*')
|
||||
log.info('Found serial devices: %s', serial_devices)
|
||||
for device in serial_devices:
|
||||
if 'usb-ZEPHYR_Zephyr_HCI_UART_sample' in device:
|
||||
log.info('Using: %s', device)
|
||||
conf.transport = f'serial:{device},115200,rtscts'
|
||||
break
|
||||
# initialize the streams dict
|
||||
@@ -88,7 +90,6 @@ async def get_status():
|
||||
}
|
||||
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
import uvicorn
|
||||
log.basicConfig(
|
||||
|
||||
Reference in New Issue
Block a user