steward_mirror/Dockerfile
Daniel Wagner d5eac108f8 feat: implement OmegaConf-based configuration management with uv
Configuration changes:
- Replace pydantic-settings with OmegaConf for flexible config management
- Support YAML config files via CONFIG_FILE environment variable
- Support environment variables with STEWARD__SECTION__KEY format
- Add config_schema.yaml as default configuration schema
- Create pydantic models for each configuration section for type safety
- Maintain backward compatibility via properties on Settings class
- Add CONFIGURATION.md with comprehensive setup and usage guide
- Update pyproject.toml to include config_schema.yaml in package data

Build/deployment changes:
- Replace pip with uv in Dockerfile for faster dependency installation
- Create docker-compose.dev.yml for local development (build .)
- Keep docker-compose.yml for production (uses ghcr.io/djw4/steward:latest)
- Update .env.example with new STEWARD__* variable format

This setup is designed for Kubernetes deployment:
- Non-sensitive config goes in ConfigMap (config.yaml)
- Secrets go in Secret resources (environment variables)
- Single unified configuration system for all environments
2026-07-26 12:34:23 +10:00

27 lines
683 B
Docker

FROM python:3.12-slim
WORKDIR /app
# Install uv
RUN pip install --no-cache-dir uv
# Install dependencies (separate layer for cache efficiency)
COPY pyproject.toml README.md ./
COPY steward/ steward/
RUN uv pip install --system --no-cache-dir .
# Create a non-root user (UID/GID 1000) and persistent data directory
RUN addgroup --gid 1000 steward \
&& adduser --uid 1000 --gid 1000 --no-create-home --disabled-password --gecos "" steward \
&& mkdir /data \
&& chown steward:steward /data
USER steward
# Default path for the thread memory store — override via env or docker-compose
ENV THREAD_MEMORY_PATH=/data/thread_memory.json
VOLUME ["/data"]
CMD ["steward"]