services:
  mesh-mqtt-observer:
    build:
      context: .
      dockerfile: Dockerfile
    container_name: mesh-mqtt-observer
    restart: unless-stopped
    env_file:
      - .env
    volumes:
      - /mnt/tank/docker/appdata/mesh-mqtt-observer:/data
    networks:
      - shared_postgres
    healthcheck:
      test: ["CMD", "python", "-m", "app.healthcheck"]
      interval: 30s
      timeout: 10s
      retries: 5
      start_period: 20s

networks:
  shared_postgres:
    external: true
    name: ${SHARED_POSTGRES_NETWORK}
