added docker-compose for linux

This commit is contained in:
2026-02-21 19:53:04 +02:00
parent be91231b05
commit 58b1ae9a5e
23 changed files with 761 additions and 16 deletions
+22
View File
@@ -0,0 +1,22 @@
#!/bin/bash
set -e
echo "[socat] Creating virtual serial port pair..."
socat PTY,raw,echo=0,link=/tmp/vcom_read PTY,raw,echo=0,link=/tmp/vcom_write &
# Wait until both PTY symlinks exist
for i in $(seq 1 20); do
if [ -e /tmp/vcom_read ] && [ -e /tmp/vcom_write ]; then
echo "[socat] Virtual ports ready: /tmp/vcom_read <-> /tmp/vcom_write"
break
fi
sleep 0.5
done
echo "[test_writer] Starting test COM port writer..."
cd /app/test_comport_writer
COM_PORT=/tmp/vcom_write python test_writer.py &
echo "[serial_bridge] Starting Flask SSE server..."
cd /app/serial_bridge
exec python app.py