mirror of
https://github.com/daveallie/crosspoint-reader.git
synced 2026-02-05 07:07:38 +03:00
36 lines
1.1 KiB
YAML
36 lines
1.1 KiB
YAML
services:
|
|
crosspoint-emulator:
|
|
build: .
|
|
container_name: crosspoint-emulator
|
|
volumes:
|
|
- ../..:/app:ro
|
|
- ../../.sdcard:/sdcard:rw
|
|
tmpfs:
|
|
- /tmp
|
|
ports:
|
|
- "8090:8090"
|
|
stdin_open: true
|
|
tty: true
|
|
stop_signal: SIGKILL
|
|
entrypoint:
|
|
- /bin/bash
|
|
- -c
|
|
- |
|
|
set -x;
|
|
set -e;
|
|
source /root/esp/esp-idf/export.sh
|
|
|
|
cd /tmp
|
|
|
|
cp /app/.pio/build/emulation/*.bin .
|
|
dd if=/dev/zero bs=1M count=16 of=./flash.bin
|
|
dd if="bootloader.bin" bs=1 count=$(stat -c%s "bootloader.bin") seek=0 conv=notrunc of=./flash.bin
|
|
dd if="partitions.bin" bs=1 count=$(stat -c%s "partitions.bin") seek=$((16#8000)) conv=notrunc of=./flash.bin
|
|
dd if="firmware.bin" bs=1 count=$(stat -c%s "firmware.bin") seek=$((16#10000)) conv=notrunc of=./flash.bin
|
|
|
|
# TODO: why pip install doesn't work in Dockerfile?
|
|
python3 -m pip install websockets --break-system-packages
|
|
|
|
cp /app/scripts/emulation/web_ui.html .
|
|
python3 /app/scripts/emulation/server.py
|