# Soleprint Services - Docker Compose
#
# Runs soleprint hub as a single service
# Artery, atlas, station are accessed via path-based routing
#
# Usage:
#   cd mainroom/soleprint && docker compose up -d

services:
  soleprint:
    build:
      context: ${SOLEPRINT_BARE_PATH}
      dockerfile: Dockerfile
    container_name: ${DEPLOYMENT_NAME}_soleprint
    volumes:
      - ${SOLEPRINT_BARE_PATH}:/app
    ports:
      - "${SOLEPRINT_PORT}:8000"
    env_file:
      - .env
    environment:
      # For single-port mode, all subsystems are internal routes
      - ARTERY_EXTERNAL_URL=/artery
      - ATLAS_EXTERNAL_URL=/atlas
      - STATION_EXTERNAL_URL=/station
    networks:
      - default
    # Use run.py for single-port bare-metal mode
    command: uvicorn run:app --host 0.0.0.0 --port 8000 --reload

networks:
  default:
    external: true
    name: ${NETWORK_NAME}
