version: '3.8'

services:
  seismic-gateway:
    build: .
    container_name: seismic-gateway
    restart: unless-stopped
    environment:
      - SERVER_URL=${SERVER_URL:-http://localhost:8000}
      - USER_TOKEN=${USER_TOKEN}
      - DEVICE_ID=${DEVICE_ID}
    volumes:
      - ./data:/app/data
      - ./config.yaml:/app/config.yaml:ro
    devices:
      - /dev/ttyUSB0:/dev/ttyUSB0  # USB Serial devices
      - /dev/ttyACM0:/dev/ttyACM0
    network_mode: host
    logging:
      driver: "json-file"
      options:
        max-size: "10m"
        max-file: "3"