content: # Use a Python image with uv pre-installed
  FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim
  
  # Install the candles service into `/app/services/candles`
  WORKDIR /app/services/candles
  
  # Enable bytecode compilation
  ENV UV_COMPILE_BYTECODE=1
  
  # Copy from the cache instead of linking since it's a mounted volume
  ENV UV_LINK_MODE=copy
  
  # First copy the workspace files needed for dependency resolution
  COPY uv.lock pyproject.toml /app/
  
  # Copy only the candles service files
  COPY services/candles /app/services/candles
  
  # Install only the candles service dependencies using workspace lockfile
  RUN --mount=type=cache,target=/root/.cache/uv \
      uv sync --frozen --no-dev --package candles
  
  # Place executables in the environment at the front of the path
  ENV PATH="/app/.venv/bin:$PATH"
  
  # Reset the entrypoint, don't invoke `uv`
  ENTRYPOINT []
  
  CMD ["uv", "run", "/app/services/candles/src/candles/main.py"]
  
  # If you want to debug the file system, uncomment the line below
  # This will keep the container running and allow you to exec into it
  # CMD ["/bin/bash", "-c", "sleep 999999"]