diff --git a/.gitignore b/.gitignore index d24ea1f..c2a9aaf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ __pycache__/ **/data/ +.internal/ diff --git a/README.md b/README.md index 442254a..65cff3f 100644 --- a/README.md +++ b/README.md @@ -1,58 +1,32 @@ -# 🌐 Unified Traefik Deployments +# 🌐 Canopy Workloads -This repository contains a unified, decoupled, and portable suite of self-hosted application stacks designed to run behind a **Traefik Reverse Proxy** in a containerized homelab environment. +This repository contains the decoupled, portable application stacks managed by the Canopy homelab platform behind a **Traefik Reverse Proxy** and the `nixos-core` `appctl` / `gitops_dispatcher` control plane. --- ## πŸ—οΈ Architectural Concept -Unlike core infrastructure systems, these applications run independently in their own directories. They integrate with the host's edge router dynamically via a shared external Docker network (`proxy-net`) and Traefik routing labels. +Each workload lives in its own top-level directory with a declarative `app.yaml` manifest (`schemaVersion: "1.0"`) and a `docker-compose.yml` baseline. Workloads attach to the shared external Docker network (`proxy-net`) and expose Traefik routing labels parameterized via runtime environment variables. -### 🌟 Host-Agnostic & Portable Design -All service definitions inside this repository are **standard, vanilla Docker Compose configurations**. While configured to read credentials from the environment, they can be deployed on **any Linux distribution** running Docker. +The root [`deployments.yaml`](deployments.yaml) serves as the authoritative workload admission registry, mapping each workload identity and its legacy webhook aliases to `~/Workloads/`. --- ## πŸ”‘ Environment Variable Injection -To prevent secret leakage and configuration duplication, services do not hardcode environment variables or depend on static, plaintext `.env` files in git. Instead, they expect configuration keys (e.g., `PROXY_NETWORK`, `MONGO_ROOT_PASSWORD`, `JELLYFIN_DOMAIN`) to be injected into the shell environment at runtime. +To prevent secret leakage and hardcoded host configuration, compose baselines do not embed personal domains, UIDs, or host-specific paths. Runtime values (`SERVICE_DOMAIN`, `PROXY_NETWORK`, `CERT_RESOLVER`, secrets, and app-specific overrides) are injected at execution time by the host control plane (`sops-nix` rendered environment + `appctl`) or a local `.env` file for standalone portability: -You can manage and inject these variables using several strategies depending on your host OS: - -### 1. Environment Managers (e.g., Mozilla SOPS / sops-nix) -* **Our Native Setup**: On NixOS, secrets are securely managed using `sops-nix`. At boot, SOPS decrypts the keys and renders a complete `.env` template to a secure RAM-backed filesystem (`/run/secrets/rendered/traefik-deployments.env`). -* **The CLI Wrapper**: We use the local `appctl` CLI tool to automatically source this decrypted file and export its values before running the docker compose commands. - -### 2. Standard Plaintext `.env` Files (Portable Fallback) -For standard Linux environments (Ubuntu, Debian, Arch, etc.), you can create a single unified `.env` file at the root of this repository and pass it during launch: ```bash -docker compose --env-file ../.env up -d +docker compose --env-file .env up -d ``` --- -## πŸ› οΈ CLI Wrapper (`appctl`) - -To simplify service management across the homelab, a lightweight Bash utility named `appctl` is located at the root of this repository. - -### Commands -* **`appctl list` / `status`**: Lists all unified services and their active runtime states. -* **`appctl up `**: Sources secrets, injects configurations, and spins up the container stack. -* **`appctl down `**: Stops and cleans up the container resources. -* **`appctl restart `**: Restarts the selected service. -* **`appctl logs `**: Streams real-time logs from the selected service. -* **`appctl config `**: Prints the active environment variables injected for a service. - ---- - ## πŸ“ Repository Structure -* **`excalidraw/`**: Collaborative whiteboarding tool. -* **`jellyfin/`**: Media server for movies, shows, and music. -* **`learning/`**: Local learning hub dashboard connected to a Turso/SQLite database and docker socket proxy. -* **`mermaid/`**: Live diagramming editor. -* **`minecraft/`**: Minecraft Java Edition server. -* **`mongo-docker/`**: MongoDB instance with replica sets initialized. -* **`pgsql/`**: PostgreSQL database container. -* **`ollama/`**: Local Large Language Model API server. -* **`appctl`**: Custom Bash management CLI. +* **`deployments.yaml`**: Authoritative workload admission registry (`schemaVersion: "1.0"`). +* **`gitea/`**: Self-hosted Git service and code repository. +* **`gitea_runner/`**: Standalone Gitea Actions CI/CD runner (`act_runner`). +* **`snappymail/`**: Lightweight webmail client. +* **`jellyfin/`**: Media server and streaming hub. +* **`armonia/`**: ArmonΓ­a del Ser API and operator dashboard. diff --git a/appctl b/appctl deleted file mode 100755 index 4d2ed36..0000000 --- a/appctl +++ /dev/null @@ -1,222 +0,0 @@ -#!/usr/bin/env bash - -# appctl - Lightweight CLI wrapper for Docker Compose in proxy-net network -# Loaded with secrets dynamically decrypted from sops-nix at /run/secrets/traefik-deployments.env - -set -e - -ENV_FILE="/run/secrets/rendered/traefik-deployments.env" -BASE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" - -# Check if environment secrets exist -if [ ! -f "$ENV_FILE" ]; then - echo "⚠️ Error: Secrets file not found at $ENV_FILE" - echo "Please make sure your NixOS system has sops-nix active and has rebuilt correctly." - exit 1 -fi - -# Source the unified secrets/configuration -# Disable shell check warning for sourcing -# shellcheck disable=SC1090 -set -a -source "$ENV_FILE" -set +a - -# Helper to load and map app-specific environment variables -load_app_env() { - local app=$1 - case "$app" in - excalidraw) - export DOMAIN="$EXCALIDRAW_DOMAIN" - export NETWORK_NAME="$PROXY_NETWORK" - export CERT_RESOLVER="$CERT_RESOLVER" - ;; - gitea) - export GITEA_VERSION="${GITEA_VERSION:-latest}" - export CONTAINER_NAME="${GITEA_CONTAINER_NAME:-gitea}" - export USER_UID="${GITEA_USER_UID:-1000}" - export USER_GID="${GITEA_USER_GID:-1000}" - export DB_TYPE="${GITEA_DB_TYPE:-sqlite3}" - export SERVICE_DOMAIN="$GITEA_DOMAIN" - export SSH_DOMAIN="${GITEA_SSH_DOMAIN:-$GITEA_DOMAIN}" - export DATA_PATH="${GITEA_DATA_PATH:-./data}" - export AUTH_MIDDLEWARE="$GITEA_AUTH_MIDDLEWARE" - export HTTPS_REDIRECT_MIDDLEWARE="https-redirect@docker" - export PROXY_NETWORK="$PROXY_NETWORK" - ;; - jellyfin) - export SERVICE_NAME="$JELLYFIN_SERVICE_NAME" - export CONTAINER_NAME="$JELLYFIN_CONTAINER_NAME" - export IMAGE_TAG="$JELLYFIN_IMAGE_TAG" - export SERVICE_DOMAIN="$JELLYFIN_DOMAIN" - export TZ="$JELLYFIN_TZ" - export PUID="$JELLYFIN_PUID" - export PGID="$JELLYFIN_PGID" - export MEDIA_PATH="$JELLYFIN_MEDIA_PATH" - export PROXY_NETWORK="$PROXY_NETWORK" - export HTTP_ENTRYPOINT="$JELLYFIN_HTTP_ENTRYPOINT" - export HTTPS_ENTRYPOINT="$JELLYFIN_HTTPS_ENTRYPOINT" - export CERT_RESOLVER="$CERT_RESOLVER" - export RATE_LIMIT_AVG="$JELLYFIN_RATE_LIMIT_AVG" - export RATE_LIMIT_BURST="$JELLYFIN_RATE_LIMIT_BURST" - ;; - learning) - export SERVICE_NAME="$LEARNING_SERVICE_NAME" - export SERVICE_DOMAIN="$LEARNING_DOMAIN" - export APP_PORT="$LEARNING_APP_PORT" - export PROXY_NETWORK="$PROXY_NETWORK" - export TURSO_DATABASE_URL="$TURSO_DATABASE_URL" - export TURSO_AUTH_TOKEN="$TURSO_AUTH_TOKEN" - ;; - mermaid) - export SERVICE_DOMAIN="$MERMAID_DOMAIN" - export PROXY_NETWORK="$PROXY_NETWORK" - export SERVICE_NAME="$MERMAID_SERVICE_NAME" - ;; - docs) - export SERVICE_NAME="docs" - export SERVICE_DOMAIN="$DOCS_DOMAIN" - export PROJECT_PATH="$DOCS_PROJECT_PATH" - export PROXY_NETWORK="$PROXY_NETWORK" - ;; - mongo-docker) - export MONGO_ROOT_USERNAME="$MONGO_ROOT_USERNAME" - export MONGO_ROOT_PASSWORD="$MONGO_ROOT_PASSWORD" - export MONGO_DOMAIN="$MONGO_DOMAIN" - export CERT_RESOLVER="$CERT_RESOLVER" - export PROXY_NETWORK="$PROXY_NETWORK" - ;; - pgsql) - export POSTGRES_USER="$POSTGRES_USER" - export POSTGRES_PASSWORD="$POSTGRES_PASSWORD" - export POSTGRES_DB="$POSTGRES_DB" - export POSTGRES_DOMAIN="$POSTGRES_DOMAIN" - export CERT_RESOLVER="$CERT_RESOLVER" - export PROXY_NETWORK="$PROXY_NETWORK" - ;; - ollama) - export SERVICE_DOMAIN="$OLLAMA_DOMAIN" - export OLLAMA_API_KEY="$OLLAMA_API_KEY" - export PROXY_NETWORK="$PROXY_NETWORK" - export REPLICAS="$OLLAMA_REPLICAS" - export OLLAMA_DATA_VOLUME="$OLLAMA_DATA_VOLUME" - ;; - minecraft) - export CONTAINER_NAME="${MINECRAFT_CONTAINER_NAME:-minecraft-server}" - export TYPE="${MINECRAFT_TYPE:-PAPER}" - export VERSION="${MINECRAFT_VERSION:-LATEST}" - export MEMORY="${MINECRAFT_MEMORY:-2G}" - export PORT="${MINECRAFT_PORT:-25565}" - export PROXY_NETWORK="$PROXY_NETWORK" - export TZ="${TZ:-UTC}" - export MINECRAFT_DOMAIN="${MINECRAFT_DOMAIN:-minecraft.${DOMAIN_SUFFIX:-arch-services.mywire.org}}" - export MINECRAFT_JWT_SECRET="${MINECRAFT_JWT_SECRET:-supersecurejwtsecretvalueforlocaldevelopmentonly}" - ;; - *) - echo "Unknown service: $app" - exit 1 - ;; - esac -} - -show_help() { - echo "Usage: appctl [service]" - echo "" - echo "Commands:" - echo " list, status List status of all applications" - echo " up Start a service" - echo " down Stop a service" - echo " restart Restart a service" - echo " logs Stream service logs" - echo " config Show active configuration for a service" -} - -get_apps() { - # Scan directories containing a docker-compose.yml file - find "$BASE_DIR" -maxdepth 2 -name "docker-compose.yml" | xargs -I {} dirname {} | xargs -I {} basename {} | sort -} - -cmd_list() { - printf "%-20s %-15s %-30s\n" "SERVICE" "STATUS" "DOMAINS/PORTS" - printf "%-20s %-15s %-30s\n" "-------" "------" "-------------" - - for app in $(get_apps); do - load_app_env "$app" - local app_dir="$BASE_DIR/$app" - - # Run docker compose to check status - if cd "$app_dir" >/dev/null 2>&1; then - # Check if any container is running in the project - local status - local domain_info="" - - if [ "$(docker compose ps --format json | wc -l)" -gt 0 ]; then - status="🟒 Running" - else - status="πŸ”΄ Stopped" - fi - - case "$app" in - excalidraw) domain_info="$EXCALIDRAW_DOMAIN" ;; - gitea) domain_info="$GITEA_DOMAIN" ;; - jellyfin) domain_info="$JELLYFIN_DOMAIN" ;; - docs) domain_info="$DOCS_DOMAIN" ;; - learning) domain_info="$LEARNING_DOMAIN" ;; - mermaid) domain_info="$MERMAID_DOMAIN" ;; - mongo-docker) domain_info="$MONGO_DOMAIN" ;; - pgsql) domain_info="$POSTGRES_DOMAIN" ;; - ollama) domain_info="$OLLAMA_DOMAIN" ;; - minecraft) domain_info="${MINECRAFT_DOMAIN:-minecraft.${DOMAIN_SUFFIX:-arch-services.mywire.org}}:$PORT" ;; - esac - - printf "%-20s %-15s %-30s\n" "$app" "$status" "$domain_info" - fi - done -} - -if [ $# -lt 1 ]; then - show_help - exit 1 -fi - -COMMAND=$1 -APP=$2 - -case "$COMMAND" in - list|status) - cmd_list - ;; - up) - if [ -z "$APP" ]; then echo "Error: Service name required"; exit 1; fi - load_app_env "$APP" - echo "πŸš€ Starting $APP..." - cd "$BASE_DIR/$APP" && docker compose up --build -d - ;; - down) - if [ -z "$APP" ]; then echo "Error: Service name required"; exit 1; fi - load_app_env "$APP" - echo "πŸ›‘ Stopping $APP..." - cd "$BASE_DIR/$APP" && docker compose down - ;; - restart) - if [ -z "$APP" ]; then echo "Error: Service name required"; exit 1; fi - load_app_env "$APP" - echo "πŸ”„ Restarting $APP..." - cd "$BASE_DIR/$APP" && docker compose down && docker compose up --build -d - ;; - logs) - if [ -z "$APP" ]; then echo "Error: Service name required"; exit 1; fi - load_app_env "$APP" - cd "$BASE_DIR/$APP" && docker compose logs -f "${@:3}" - ;; - config) - if [ -z "$APP" ]; then echo "Error: Service name required"; exit 1; fi - load_app_env "$APP" - echo "=== Active Environment Variables for $APP ===" - env | grep -E "^(PROXY_NETWORK|CERT_RESOLVER|DOMAIN|SERVICE_DOMAIN|SERVICE_NAME|CONTAINER_NAME|IMAGE_TAG|TZ|PUID|PGID|MEDIA_PATH|HTTP_ENTRYPOINT|HTTPS_ENTRYPOINT|RATE_LIMIT_AVG|RATE_LIMIT_BURST|APP_PORT|SOCKET_PROXY_NETWORK|TURSO_DATABASE_URL|TURSO_AUTH_TOKEN|DOCKER_HOST|MONGO_ROOT_USERNAME|MONGO_ROOT_PASSWORD|MONGO_DOMAIN|POSTGRES_USER|POSTGRES_PASSWORD|POSTGRES_DB|POSTGRES_DOMAIN|OLLAMA_API_KEY|REPLICAS|OLLAMA_DATA_VOLUME|GITEA_VERSION|GITEA_DOMAIN|GITEA_SSH_DOMAIN|GITEA_AUTH_MIDDLEWARE|SSH_DOMAIN|DATA_PATH|AUTH_MIDDLEWARE|HTTPS_REDIRECT_MIDDLEWARE|PROJECT_PATH|DOCS_PROJECT_PATH|DOCS_DOMAIN|MINECRAFT_CONTAINER_NAME|MINECRAFT_TYPE|MINECRAFT_VERSION|MINECRAFT_MEMORY|MINECRAFT_PORT|MINECRAFT_DOMAIN|PORT|TYPE|VERSION|MEMORY|MINECRAFT_JWT_SECRET|JWT_SECRET)" | sort - ;; - *) - show_help - exit 1 - ;; -esac diff --git a/armonia/.env-example b/armonia/.env-example new file mode 100644 index 0000000..7acdd61 --- /dev/null +++ b/armonia/.env-example @@ -0,0 +1,36 @@ +# --- Required Build & Image Resolution --- +# Upstream Git repository URL for building armonia-dashboard (required for compose_build) +DASHBOARD_REPO_URL=https://git.example.com/org/armonia-dashboard.git +DASHBOARD_REF=main +# Pre-built container image reference for armonia-api +ARMONIA_API_IMAGE=armonia-api:latest + +# --- Runtime & Database --- +ENVIRONMENT=production +APP_ENV=production +AUTH_PROVIDER=proxy_headers +DATABASE_URL=file:/data/armonia.db +DATABASE_AUTH_TOKEN= + +# --- Domain & Proxy Configuration (injected by host runtime / appctl) --- +SERVICE_DOMAIN=armonia.example.com +PROXY_NETWORK=proxy-net +HTTP_ENTRYPOINT=web +HTTPS_ENTRYPOINT=websecure +CERT_RESOLVER=myresolver +AUTH_MIDDLEWARE=authelia-auth@docker +HTTPS_REDIRECT_MIDDLEWARE=https-redirect@docker + +# --- User/Group IDs --- +PUID=1000 +PGID=1000 + +# --- Application Settings --- +THERAPIST_NAME= +BUSINESS_NAME=ArmonΓ­a del Ser +WHATSAPP_PHONE= +SPEI_CLABE= +SPEI_BANK= +SPEI_BENEFICIARY= +GCAL_CALENDAR_ID=primary +GOOGLE_SERVICE_ACCOUNT_JSON= diff --git a/armonia/Dockerfile.dashboard b/armonia/Dockerfile.dashboard new file mode 100644 index 0000000..9c24105 --- /dev/null +++ b/armonia/Dockerfile.dashboard @@ -0,0 +1,36 @@ +# syntax=docker/dockerfile:1 +# Multi-stage production container build for armonia-dashboard (Vite SPA -> Nginx Alpine) + +# Stage 1: Clone and build static SPA bundle from upstream Gitea repository +FROM node:22-alpine AS builder + +ARG PNPM_VERSION=9.15.4 + +RUN apk add --no-cache git && \ + corepack enable && \ + corepack prepare pnpm@${PNPM_VERSION} --activate + +ARG DASHBOARD_REPO_URL="" +ARG DASHBOARD_REF=main +ARG VITE_API_BASE_URL=/api + +ENV VITE_API_BASE_URL=${VITE_API_BASE_URL} + +WORKDIR /app + +RUN test -n "${DASHBOARD_REPO_URL}" || { echo "ERROR: DASHBOARD_REPO_URL build arg is required" >&2; exit 1; } && \ + git clone --depth 1 --branch "${DASHBOARD_REF}" "${DASHBOARD_REPO_URL}" . && \ + pnpm install --frozen-lockfile && \ + pnpm run build + + +# Stage 2: Lightweight Nginx Alpine runtime serving static assets and proxying /api +FROM nginx:1.27-alpine AS runtime + +COPY nginx.conf /etc/nginx/conf.d/default.conf +COPY --from=builder /app/dist /usr/share/nginx/html + +EXPOSE 80 + +HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 \ + CMD wget -q -O /dev/null http://127.0.0.1:80/ || exit 1 diff --git a/armonia/app.yaml b/armonia/app.yaml new file mode 100644 index 0000000..62cc62c --- /dev/null +++ b/armonia/app.yaml @@ -0,0 +1,27 @@ +schemaVersion: "1.0" +name: "armonia" +aliases: + - "armonia-del-ser" + - "jasmin" +description: "ArmonΓ­a del Ser β€” Holistic Consultation & Operator Dashboard" +visible: true +auth: true +networks: + - proxy-net +env: + ENVIRONMENT: "production" + AUTH_PROVIDER: "proxy_headers" + DATABASE_URL: "file:/data/armonia.db" +deployment: + strategy: "compose" + branch: "main" + actions: + - git_pull + - compose_build + - compose_up +homepage: + title: "ArmonΓ­a del Ser" + group: "Applications" + icon: "calendar.png" + container: "armonia-dashboard" + weight: 20 diff --git a/armonia/docker-compose.yml b/armonia/docker-compose.yml new file mode 100644 index 0000000..6a3d227 --- /dev/null +++ b/armonia/docker-compose.yml @@ -0,0 +1,99 @@ +services: + armonia-api: + image: ${ARMONIA_API_IMAGE:-armonia-api:latest} + container_name: ${ARMONIA_API_CONTAINER:-armonia-api} + user: "${PUID:-1000}:${PGID:-1000}" + restart: unless-stopped + volumes: + - ./data:/data + environment: + - ENVIRONMENT=${ENVIRONMENT:-production} + - APP_ENV=${APP_ENV:-production} + - AUTH_PROVIDER=${AUTH_PROVIDER:-proxy_headers} + - DATABASE_URL=${DATABASE_URL:-file:/data/armonia.db} + - DATABASE_AUTH_TOKEN=${DATABASE_AUTH_TOKEN:-} + - DASHBOARD_ORIGIN_URL=https://${SERVICE_DOMAIN} + - CORS_ORIGINS=${CORS_ORIGINS:-["https://${SERVICE_DOMAIN}"]} + - THERAPIST_NAME=${THERAPIST_NAME:-} + - BUSINESS_NAME=${BUSINESS_NAME:-ArmonΓ­a del Ser} + - WHATSAPP_PHONE=${WHATSAPP_PHONE:-} + - SPEI_CLABE=${SPEI_CLABE:-} + - SPEI_BANK=${SPEI_BANK:-} + - SPEI_BENEFICIARY=${SPEI_BENEFICIARY:-} + - GCAL_CALENDAR_ID=${GCAL_CALENDAR_ID:-primary} + - GOOGLE_SERVICE_ACCOUNT_JSON=${GOOGLE_SERVICE_ACCOUNT_JSON:-} + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:8000/health"] + interval: 30s + timeout: 5s + retries: 3 + networks: + - proxy-net + labels: + - "diun.enable=false" + - "traefik.enable=true" + + # Middleware: Strip /api prefix before forwarding to FastAPI (which serves at /) + - "traefik.http.middlewares.armonia-api-strip.stripprefix.prefixes=/api" + + # 1. Public API & Health Router (Priority 30 β€” bypasses Authelia forward-auth) + - "traefik.http.routers.armonia-api-public.rule=Host(`${SERVICE_DOMAIN}`) && (PathPrefix(`/api/health`) || PathPrefix(`/api/availability`) || (Method(`GET`, `HEAD`, `OPTIONS`) && PathPrefix(`/api/services`)) || (Method(`POST`, `OPTIONS`) && PathPrefix(`/api/bookings`)))" + - "traefik.http.routers.armonia-api-public.entrypoints=${HTTPS_ENTRYPOINT:-websecure}" + - "traefik.http.routers.armonia-api-public.tls=true" + - "traefik.http.routers.armonia-api-public.tls.certresolver=${CERT_RESOLVER:-myresolver}" + - "traefik.http.routers.armonia-api-public.priority=30" + - "traefik.http.routers.armonia-api-public.middlewares=armonia-api-strip@docker" + - "traefik.http.routers.armonia-api-public.service=armonia-api-svc" + + # 2. Protected Operator API Router (Priority 20 β€” guarded by Authelia + LLDAP role mapping) + - "traefik.http.routers.armonia-api.rule=Host(`${SERVICE_DOMAIN}`) && PathPrefix(`/api`)" + - "traefik.http.routers.armonia-api.entrypoints=${HTTPS_ENTRYPOINT:-websecure}" + - "traefik.http.routers.armonia-api.tls=true" + - "traefik.http.routers.armonia-api.tls.certresolver=${CERT_RESOLVER:-myresolver}" + - "traefik.http.routers.armonia-api.priority=20" + - "traefik.http.routers.armonia-api.middlewares=${AUTH_MIDDLEWARE:-authelia-auth@docker},armonia-api-strip@docker" + - "traefik.http.routers.armonia-api.service=armonia-api-svc" + + # Service Target + - "traefik.http.services.armonia-api-svc.loadbalancer.server.port=8000" + + armonia-dashboard: + build: + context: . + dockerfile: Dockerfile.dashboard + args: + DASHBOARD_REPO_URL: ${DASHBOARD_REPO_URL:-} + DASHBOARD_REF: ${DASHBOARD_REF:-main} + VITE_API_BASE_URL: /api + container_name: ${ARMONIA_DASHBOARD_CONTAINER:-armonia-dashboard} + restart: unless-stopped + depends_on: + armonia-api: + condition: service_healthy + networks: + - proxy-net + labels: + - "diun.enable=false" + - "traefik.enable=true" + + # 3. Protected Operator Dashboard UI Router (Priority 10 β€” guarded by Authelia) + - "traefik.http.routers.armonia-dashboard.rule=Host(`${SERVICE_DOMAIN}`) && PathPrefix(`/`)" + - "traefik.http.routers.armonia-dashboard.entrypoints=${HTTPS_ENTRYPOINT:-websecure}" + - "traefik.http.routers.armonia-dashboard.tls=true" + - "traefik.http.routers.armonia-dashboard.tls.certresolver=${CERT_RESOLVER:-myresolver}" + - "traefik.http.routers.armonia-dashboard.priority=10" + - "traefik.http.routers.armonia-dashboard.middlewares=${AUTH_MIDDLEWARE:-authelia-auth@docker}" + - "traefik.http.routers.armonia-dashboard.service=armonia-dashboard-svc" + + # 4. HTTP to HTTPS Redirect + - "traefik.http.routers.armonia-red.rule=Host(`${SERVICE_DOMAIN}`)" + - "traefik.http.routers.armonia-red.entrypoints=${HTTP_ENTRYPOINT:-web}" + - "traefik.http.routers.armonia-red.middlewares=${HTTPS_REDIRECT_MIDDLEWARE:-https-redirect@docker}" + + # Service Target + - "traefik.http.services.armonia-dashboard-svc.loadbalancer.server.port=80" + +networks: + proxy-net: + name: ${PROXY_NETWORK:-proxy-net} + external: true diff --git a/armonia/nginx.conf b/armonia/nginx.conf new file mode 100644 index 0000000..9a7bd66 --- /dev/null +++ b/armonia/nginx.conf @@ -0,0 +1,39 @@ +server { + listen 80; + server_name _; + + root /usr/share/nginx/html; + index index.html; + + # Compression for static assets + gzip on; + gzip_types text/plain text/css application/json application/javascript text/xml application/xml text/javascript image/svg+xml; + gzip_min_length 256; + + # Internal reverse proxy fallback for /api/* -> armonia-api:8000/* + # Preserves Authelia ForwardAuth headers (Remote-Email, Remote-User, Remote-Groups, Remote-Name) + location /api/ { + proxy_pass http://armonia-api:8000/; + proxy_http_version 1.1; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header Remote-User $http_remote_user; + proxy_set_header Remote-Email $http_remote_email; + proxy_set_header Remote-Name $http_remote_name; + proxy_set_header Remote-Groups $http_remote_groups; + } + + # Immutable Vite hashed assets + location /assets/ { + expires 1y; + add_header Cache-Control "public, immutable"; + try_files $uri =404; + } + + # SPA fallback routing + location / { + try_files $uri $uri/ /index.html; + } +} diff --git a/deployments.yaml b/deployments.yaml new file mode 100644 index 0000000..32138e1 --- /dev/null +++ b/deployments.yaml @@ -0,0 +1,31 @@ +# Authoritative Workload Admission Registry +# Enforces strict path containment within ~/Workloads (WORKLOADS_DIR). + +schemaVersion: "1.0" +repositories: + gitea: + path: "~/Workloads/gitea" + aliases: + - "git" + - "homelab-gitea" + gitea_runner: + path: "~/Workloads/gitea_runner" + aliases: + - "act_runner" + - "runner" + snappymail: + path: "~/Workloads/snappymail" + aliases: + - "mail" + - "webmail" + jellyfin: + path: "~/Workloads/jellyfin" + aliases: + - "media" + - "homelab-jellyfin" + armonia: + path: "~/Workloads/armonia" + aliases: + - "armonia-del-ser" + - "jasmin" + - "homelab-armonia" diff --git a/docs/Dockerfile b/docs/Dockerfile deleted file mode 100644 index 71f76e0..0000000 --- a/docs/Dockerfile +++ /dev/null @@ -1,17 +0,0 @@ -FROM python:3.11-alpine - -WORKDIR /app - -# Install dependencies -RUN pip install --no-cache-dir markdown - -# Copy application files -COPY app/ /app/ - -# Default Environment Variables -ENV PORT=8000 -ENV DOCS_ROOT=/docs - -EXPOSE 8000 - -CMD ["python", "main.py"] diff --git a/docs/app/layout.html b/docs/app/layout.html deleted file mode 100644 index fc441d5..0000000 --- a/docs/app/layout.html +++ /dev/null @@ -1,961 +0,0 @@ - - - - - - {{ title }} - Documentation - - - - - - - - - - - - - - - - -
- -
- - - -
- - -
-
- {{ content }} - - -
- - {% if has_toc %} - - {% endif %} -
-
- - - - - - - - - - - - - - diff --git a/docs/app/main.py b/docs/app/main.py deleted file mode 100644 index ff719e4..0000000 --- a/docs/app/main.py +++ /dev/null @@ -1,426 +0,0 @@ -import os -import sys -import re -import mimetypes -import urllib.parse -import posixpath -from http.server import HTTPServer, BaseHTTPRequestHandler -import markdown - -# Configurable paths -DOCS_ROOT = os.path.realpath(os.environ.get("DOCS_ROOT", "/docs")) -PORT = int(os.environ.get("PORT", "8000")) - -# Read layout template -TEMPLATE_PATH = os.path.join(os.path.dirname(__file__), 'layout.html') -try: - with open(TEMPLATE_PATH, 'r', encoding='utf-8') as f: - TEMPLATE = f.read() -except OSError: - print(f"Error: Could not read template from {TEMPLATE_PATH}", file=sys.stderr) - TEMPLATE = "{{ content }}" - - -def is_safe_path(path): - """Ensure the path is within the DOCS_ROOT directory to prevent traversal.""" - real_path = os.path.realpath(path) - return real_path == DOCS_ROOT or real_path.startswith(DOCS_ROOT + os.sep) - - -def get_breadcrumbs(url_path): - """Generate beautiful navigation breadcrumbs.""" - parts = [p for p in url_path.split('/') if p] - breadcrumbs_html = 'Home' - - current_acc = "" - for i, part in enumerate(parts): - current_acc += f"/{part}" - breadcrumbs_html += ' / ' - if i == len(parts) - 1: - breadcrumbs_html += f'{part}' - else: - breadcrumbs_html += f'{part}' - - return breadcrumbs_html - - -def build_tree(path): - """Recursively build a tree of folders and markdown files.""" - items = [] - try: - names = os.listdir(path) - except OSError: - return [] - - for name in names: - if name.startswith('.'): - continue - if name in ('node_modules', 'venv', '.git', '__pycache__', 'data'): - continue - - full_path = os.path.join(path, name) - rel_path = os.path.relpath(full_path, DOCS_ROOT) - - if os.path.isdir(full_path): - children = build_tree(full_path) - # Only list directory if it contains markdown files or subdirs with markdown files - if children: - items.append({ - 'name': name, - 'type': 'dir', - 'rel_path': rel_path.replace(os.sep, '/'), - 'children': children - }) - elif name.endswith('.md'): - url_name = name[:-3] - # Handle root readme differently or filter it - if url_name.lower() in ('readme', 'index') and rel_path == name: - # We skip showing root readme directly in sidebar tree to prevent clutter, - # as it is already mapped to the Home button. - continue - - # Form clean url - url_path = os.path.splitext(rel_path)[0] - url = '/' + url_path.replace(os.sep, '/') - - # If it's a subdirectory README, we want to link it to the folder URL - if url_name.lower() in ('readme', 'index'): - parent_dir = os.path.dirname(rel_path) - url = '/' + parent_dir.replace(os.sep, '/') if parent_dir else '/' - display_name = os.path.basename(parent_dir) if parent_dir else 'Home' - else: - display_name = url_name - - items.append({ - 'name': display_name, - 'type': 'file', - 'url': url, - 'rel_path': rel_path.replace(os.sep, '/') - }) - - # Sort folders first, then files - items.sort(key=lambda x: (0 if x['type'] == 'dir' else 1, x['name'].lower())) - return items - - -def render_tree(tree, active_url): - """Render the built tree into HTML nested ul/details list.""" - if not tree: - return "" - - html = '' - return html - - -def process_alerts(html): - """Convert GitHub-style alerts > [!NOTE] into beautiful callouts.""" - pattern = re.compile( - r'
\s*

\s*\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)\](.*?)

(.*?)
', - re.DOTALL | re.IGNORECASE - ) - - def replace_alert(match): - alert_type = match.group(1).upper() - content = match.group(2).strip() - rest = match.group(3).strip() - - # Colors, icons and styling - alerts = { - 'NOTE': ('#3b82f6', 'ℹ️', 'Note', 'rgba(59, 130, 246, 0.08)'), - 'TIP': ('#10b981', 'πŸ’‘', 'Tip', 'rgba(16, 185, 129, 0.08)'), - 'IMPORTANT': ('#8b5cf6', 'πŸ“’', 'Important', 'rgba(139, 92, 246, 0.08)'), - 'WARNING': ('#f59e0b', '⚠️', 'Warning', 'rgba(245, 158, 11, 0.08)'), - 'CAUTION': ('#ef4444', '🚨', 'Caution', 'rgba(239, 68, 68, 0.08)') - } - - color, icon, title, bg = alerts.get(alert_type, ('#64748b', 'ℹ️', 'Note', 'rgba(100, 116, 139, 0.08)')) - - full_content = content - if rest: - full_content += f"

{rest}

" - - return f'''
-
- {icon} - {title} -
-
{full_content}
-
''' - - return pattern.sub(replace_alert, html) - - -def preserve_math(text): - """Protect LaTeX math blocks ($...$ and $$...$$) from being altered by Markdown parser.""" - math_blocks = [] - - # Stash inline code and code blocks first to avoid stashing math inside code blocks - code_blocks = [] - def stash_code(m): - code_blocks.append(m.group(0)) - return f"CODEBLOCKTOKEN{len(code_blocks)-1}END" - - # Match ``` ``` code blocks and ` ` inline code - text = re.sub(r'```.*?```', stash_code, text, flags=re.DOTALL) - text = re.sub(r'`[^`\n]+`', stash_code, text) - - def stash_math(m): - math_blocks.append(m.group(0)) - return f"MATHBLOCKTOKEN{len(math_blocks)-1}END" - - # Match display math $$...$$ - text = re.sub(r'\$\$.*?\$\$', stash_math, text, flags=re.DOTALL) - # Match inline math $...$ (ensuring single $ on same line, not empty) - text = re.sub(r'(?Error loading directory" - - names.sort() - - html = f"

Index of {rel_url_path}

" - html += "
    " - - if rel_url_path != '/': - parent = posixpath.dirname(rel_url_path) - html += f"
  • πŸ“ .. (Parent Directory)
  • " - - for name in names: - if name.startswith('.') or name in ('node_modules', 'venv', '.git', '__pycache__', 'data'): - continue - - full_p = os.path.join(folder_path, name) - is_dir = os.path.isdir(full_p) - - if is_dir: - url = posixpath.join(rel_url_path, name) - html += f"
  • πŸ“ {name}/
  • " - elif name.endswith('.md'): - url_name = name[:-3] - url = posixpath.join(rel_url_path, url_name) - html += f"
  • πŸ“„ {url_name}
  • " - else: - url = posixpath.join(rel_url_path, name) - html += f"
  • πŸ“Ž {name}
  • " - - html += "
" - return html - - -class DocsHTTPHandler(BaseHTTPRequestHandler): - def log_message(self, format, *args): - # Override to log cleanly to stdout/stderr - sys.stdout.write("%s - - [%s] %s\n" % - (self.address_string(), - self.log_date_time_string(), - format%args)) - - def resolve_url_to_file(self, path_str): - """Maps HTTP path to filesystem path inside DOCS_ROOT.""" - path_str = urllib.parse.unquote(path_str) - parsed = urllib.parse.urlparse(path_str) - clean_path = posixpath.normpath(parsed.path) - - if clean_path.startswith('../') or '/../' in clean_path: - return None, None, False - - rel_path = clean_path.lstrip('/') - - # If accessing root directory - if not rel_path: - for name in ('README.md', 'index.md', 'readme.md', 'README.markdown', 'readme.markdown'): - full_p = os.path.join(DOCS_ROOT, name) - if os.path.isfile(full_p): - return full_p, '/', True - # No root readme, return DOCS_ROOT directory for auto-index - return DOCS_ROOT, '/', False - - full_p = os.path.join(DOCS_ROOT, rel_path) - - # 1. Direct file check - if os.path.isfile(full_p): - is_md = full_p.endswith('.md') or full_p.endswith('.markdown') - return full_p, '/' + rel_path, is_md - - # 2. Check path + .md - if not rel_path.endswith('.md'): - md_path = full_p + '.md' - if os.path.isfile(md_path): - return md_path, '/' + rel_path, True - - # 3. Check directory - if os.path.isdir(full_p): - for name in ('README.md', 'index.md', 'readme.md'): - sub_p = os.path.join(full_p, name) - if os.path.isfile(sub_p): - return sub_p, '/' + rel_path, True - # Folder without index README, serve directory index page - return full_p, '/' + rel_path, False - - return None, '/' + rel_path, False - - def do_GET(self): - filepath, active_url, is_md = self.resolve_url_to_file(self.path) - - if not filepath or not is_safe_path(filepath): - self.render_error(404, "Page Not Found", active_url) - return - - # Serve static asset - if not is_md and os.path.isfile(filepath): - self.serve_static_file(filepath) - return - - # Serve Markdown or Directory Index - if is_md: - try: - with open(filepath, 'r', encoding='utf-8') as f: - md_content = f.read() - except OSError: - self.render_error(500, "Internal Server Error - Could not read file", active_url) - return - - # Render Markdown - md_content, math_blocks = preserve_math(md_content) - md = markdown.Markdown(extensions=['extra', 'toc', 'nl2br']) - html_content = md.convert(md_content) - html_content = restore_math(html_content, math_blocks) - html_content = process_alerts(html_content) - - toc_html = md.toc - has_toc = 'href=' in toc_html - - title = os.path.basename(filepath) - if title.endswith('.md'): - title = title[:-3] - if title.lower() in ('readme', 'index'): - parent_dir = os.path.basename(os.path.dirname(filepath)) - title = parent_dir if parent_dir else "Home" - else: - # Renders folder directory index - html_content = generate_folder_index(filepath, active_url) - toc_html = "" - has_toc = False - title = os.path.basename(filepath) or "Index" - - # Generate Sidebar tree - sidebar_tree_data = build_tree(DOCS_ROOT) - sidebar_html = render_tree(sidebar_tree_data, active_url) - - # Build breadcrumbs - breadcrumbs = get_breadcrumbs(active_url) - - # Render page using layout - page_html = TEMPLATE - page_html = page_html.replace('{{ title }}', title) - page_html = page_html.replace('{{ home_active }}', ' active' if active_url == '/' else '') - page_html = page_html.replace('{{ sidebar_tree }}', sidebar_html) - page_html = page_html.replace('{{ breadcrumbs }}', breadcrumbs) - page_html = page_html.replace('{{ content }}', html_content) - page_html = page_html.replace('{{ toc }}', toc_html) - page_html = page_html.replace('{{ grid_class }}', ' has-toc' if has_toc else '') - - # Conditional template logic for TOC - if has_toc: - page_html = page_html.replace('{% if has_toc %}', '').replace('{% endif %}', '') - else: - page_html = re.sub(r'{% if has_toc %}.*?{% endif %}', '', page_html, flags=re.DOTALL) - - self.send_response(200) - self.send_header('Content-Type', 'text/html; charset=utf-8') - self.send_header('Cache-Control', 'no-store, no-cache, must-revalidate') - self.end_headers() - self.wfile.write(page_html.encode('utf-8')) - - def serve_static_file(self, filepath): - try: - with open(filepath, 'rb') as f: - content = f.read() - except OSError: - self.send_error(404, "File not found") - return - - self.send_response(200) - ctype, _ = mimetypes.guess_type(filepath) - if not ctype: - ctype = 'application/octet-stream' - self.send_header('Content-Type', ctype) - self.send_header('Content-Length', str(len(content))) - self.send_header('Cache-Control', 'public, max-age=600') - self.end_headers() - self.wfile.write(content) - - def render_error(self, code, message, active_url): - # Render a nice formatted error inside the layout - error_html = f''' -
-

{code}

-

{message}

- Go Home -
- ''' - sidebar_tree_data = build_tree(DOCS_ROOT) - sidebar_html = render_tree(sidebar_tree_data, active_url) - breadcrumbs = get_breadcrumbs(active_url) - - page_html = TEMPLATE - page_html = page_html.replace('{{ title }}', f"Error {code}") - page_html = page_html.replace('{{ home_active }}', '') - page_html = page_html.replace('{{ sidebar_tree }}', sidebar_html) - page_html = page_html.replace('{{ breadcrumbs }}', breadcrumbs) - page_html = page_html.replace('{{ content }}', error_html) - page_html = page_html.replace('{{ toc }}', '') - page_html = page_html.replace('{{ grid_class }}', '') - page_html = re.sub(r'{% if has_toc %}.*?{% endif %}', '', page_html, flags=re.DOTALL) - - self.send_response(code) - self.send_header('Content-Type', 'text/html; charset=utf-8') - self.end_headers() - self.wfile.write(page_html.encode('utf-8')) - - -def run_server(): - server_address = ('', PORT) - httpd = HTTPServer(server_address, DocsHTTPHandler) - print(f"Starting markdown docs server on port {PORT}...") - print(f"Serving files from {DOCS_ROOT}") - try: - httpd.serve_forever() - except KeyboardInterrupt: - pass - print("\nStopping server.") - -if __name__ == '__main__': - run_server() diff --git a/docs/data/README.md b/docs/data/README.md deleted file mode 100644 index c77cb5e..0000000 --- a/docs/data/README.md +++ /dev/null @@ -1,71 +0,0 @@ -# πŸ“ Documentation Viewer - -Self-hosted local documentation viewer. This service serves markdown files from a designated directory as a lightweight, reactive HTML site with instant reloads. - -> [!NOTE] -> Any changes you made to the markdown files in the documentation directory will show up here immediately upon refreshing the page. No rebuild steps, no compilation delay. - ---- - -## πŸš€ Getting Started - -To mount your project documentation, configure the following environment variables in your deployment setup: - -1. **`DOCS_DOMAIN`**: The domain you want Traefik to route to this viewer (e.g. `docs.homelab.local`). -2. **`DOCS_PROJECT_PATH`**: The absolute path on your host machine pointing to your markdown files (e.g. `/home/kiskaadee/Projects/my-app/docs`). - -For example, when using the repository's `appctl` CLI wrapper: -```bash -# Sourcing environment, appctl maps: -# DOCS_PROJECT_PATH -> PROJECT_PATH -./appctl up docs -``` - ---- - -## πŸ› οΈ Features - -Here is a breakdown of what this documentation server provides out-of-the-box: - -### 1. Dynamic Routing -- `GET /` resolves to `README.md` or `index.md` at your documentation root. -- `GET /docs/infra` matches `docs/infra.md` or `docs/infra/README.md`. -- Clicking directories with no `README.md` serves an automatic, styled list of that folder's contents. - -### 2. Search & Sidebar Navigation -- The sidebar dynamically scans the directories of your project workspace for `.md` files. -- You can filter documentation files instantly using the **Search** input at the top of the sidebar. It searches across names and URLs. - -### 3. Sleek Themes (Light & Dark) -- Persisted theme settings using `localStorage`. -- Click the toggle button in the bottom-left corner of the sidebar to switch between a gorgeous dark slate mode and a clean light mode. - -### 4. Code Highlight & Copy -- Code blocks are automatically highlighted with Prism.js. -- Hovering over a code block shows a **Copy** button to copy code instantly. - -```python -# Test Python block -def hello_world(): - print("Welcome to your local docs!") - return True -``` - -### 5. Mermaid.js Support -You can render flowcharts, sequence diagrams, and class diagrams directly inside your markdown pages using standard fenced code blocks labeled `mermaid`. - -```mermaid -graph TD - A[Browse Docs] -->|GET /path| B(Safe Path Resolver) - B -->|Found .md| C{Render Markdown} - B -->|Found Folder| D[Generate Directory Listing] - C -->|Parse HTML| E[Inject layout.html Template] - D -->|Inject list| E - E -->|Serve Browser| F((Wow User!)) -``` - -### 6. Alert Callouts -Use standard GitHub alert formatting to highlight notices: - -> [!TIP] -> Use callout boxes to highlight important tips, warnings, or caution sections. They render with custom icons and borders. diff --git a/docs/docker-compose.yml b/docs/docker-compose.yml deleted file mode 100644 index 387c036..0000000 --- a/docs/docker-compose.yml +++ /dev/null @@ -1,32 +0,0 @@ -services: - docs: - build: . - container_name: ${SERVICE_NAME} - restart: unless-stopped - volumes: - - ${PROJECT_PATH:-./data}:/docs:ro - - ./app:/app:ro - environment: - - DOCS_ROOT=/docs - - PORT=8000 - networks: - - proxy - labels: - - "traefik.enable=true" - - "traefik.http.routers.${SERVICE_NAME}.rule=Host(`${SERVICE_DOMAIN}`)" - - "traefik.http.routers.${SERVICE_NAME}.entrypoints=websecure" - - "traefik.http.routers.${SERVICE_NAME}.tls=true" - - "traefik.http.routers.${SERVICE_NAME}.service=${SERVICE_NAME}-svc" - - # HTTP to HTTPS redirect - - "traefik.http.routers.${SERVICE_NAME}-red.rule=Host(`${SERVICE_DOMAIN}`)" - - "traefik.http.routers.${SERVICE_NAME}-red.entrypoints=web" - - "traefik.http.routers.${SERVICE_NAME}-red.middlewares=https-redirect@docker" - - # Target Port - - "traefik.http.services.${SERVICE_NAME}-svc.loadbalancer.server.port=8000" - -networks: - proxy: - name: ${PROXY_NETWORK} - external: true diff --git a/excalidraw/.env-example b/excalidraw/.env-example deleted file mode 100644 index 55b37ea..0000000 --- a/excalidraw/.env-example +++ /dev/null @@ -1,8 +0,0 @@ -# The domain where Excalidraw will be accessible (e.g., excalidraw.example.com) -DOMAIN=excalidraw.example.com - -# The name of the external Docker network used by Traefik -NETWORK_NAME=proxy-net - -# The name of the certificate resolver configured in Traefik -CERT_RESOLVER=myresolver diff --git a/excalidraw/.gitignore b/excalidraw/.gitignore deleted file mode 100644 index 4c49bd7..0000000 --- a/excalidraw/.gitignore +++ /dev/null @@ -1 +0,0 @@ -.env diff --git a/excalidraw/README.md b/excalidraw/README.md deleted file mode 100644 index 7d2918b..0000000 --- a/excalidraw/README.md +++ /dev/null @@ -1,23 +0,0 @@ -# Excalidraw - -Excalidraw is a virtual whiteboard for sketching hand-drawn like diagrams. This folder contains the Docker Compose configuration to run Excalidraw and its backend (room) service, integrated with Traefik for reverse proxying and SSL. - ---- - -## πŸš€ Deployment - -This service is managed as part of the unified Traefik deployments stack. - -To start: -```bash -appctl up excalidraw -``` - -Refer to the root [README.md](../README.md) for details on how environment variables are securely injected at runtime. - ---- - -## πŸ“¦ Services - -- **excalidraw**: The main web application. -- **excalidraw-room**: The backend service for real-time collaboration. diff --git a/excalidraw/docker-compose.yml b/excalidraw/docker-compose.yml deleted file mode 100644 index c10d22f..0000000 --- a/excalidraw/docker-compose.yml +++ /dev/null @@ -1,46 +0,0 @@ -services: - excalidraw: - image: excalidraw/excalidraw:latest - restart: unless-stopped - environment: - - REACT_APP_BACKEND_V2_GET_URL=https://${DOMAIN}/api/v2 - - REACT_APP_BACKEND_V2_POST_URL=https://${DOMAIN}/api/v2 - - REACT_APP_WS_SERVER_URL=wss://${DOMAIN}/socket.io - networks: - - public - labels: - - "traefik.enable=true" - - "traefik.http.routers.excalidraw.rule=Host(`${DOMAIN}`)" - - "traefik.http.routers.excalidraw.entrypoints=websecure" - - "traefik.http.routers.excalidraw.tls=true" - - "traefik.http.routers.excalidraw.tls.certresolver=${CERT_RESOLVER}" - - "traefik.http.routers.excalidraw.service=excalidraw-svc" - - "traefik.http.routers.excalidraw-red.rule=Host(`${DOMAIN}`)" - - "traefik.http.routers.excalidraw-red.entrypoints=web" - - "traefik.http.routers.excalidraw-red.middlewares=https-redirect@docker" - - - "traefik.http.services.excalidraw-svc.loadbalancer.server.port=80" - - excalidraw-room: - image: excalidraw/excalidraw-room:latest - restart: unless-stopped - networks: - - public - labels: - - "traefik.enable=true" - - "traefik.http.routers.excalidraw-room.rule=Host(`${DOMAIN}`) && PathPrefix(`/socket.io`)" - - "traefik.http.routers.excalidraw-room.entrypoints=websecure" - - "traefik.http.routers.excalidraw-room.tls=true" - - "traefik.http.routers.excalidraw-room.tls.certresolver=${CERT_RESOLVER}" - - "traefik.http.routers.excalidraw-room.service=excalidraw-room-svc" - - "traefik.http.routers.excalidraw-room-red.rule=Host(`${DOMAIN}`) && PathPrefix(`/socket.io`)" - - "traefik.http.routers.excalidraw-room-red.entrypoints=web" - - "traefik.http.routers.excalidraw-room-red.middlewares=https-redirect@docker" - - - "traefik.http.services.excalidraw-room-svc.loadbalancer.server.port=8080" - - -networks: - public: - name: ${NETWORK_NAME} - external: true diff --git a/gitea/app.yaml b/gitea/app.yaml new file mode 100644 index 0000000..3716278 --- /dev/null +++ b/gitea/app.yaml @@ -0,0 +1,23 @@ +schemaVersion: "1.0" +name: "gitea" +aliases: + - "git" +description: "Self-Hosted Git Service & Code Repository" +visible: true +auth: false +networks: + - proxy-net +env: + SSH_PORT: "2223" +deployment: + strategy: "compose" + branch: "main" + actions: + - git_pull + - compose_up +homepage: + title: "Gitea" + group: "Development & AI" + icon: "gitea.png" + container: "gitea" + weight: 10 diff --git a/gitea/docker-compose.yml b/gitea/docker-compose.yml index 81cf1ac..328a0b0 100644 --- a/gitea/docker-compose.yml +++ b/gitea/docker-compose.yml @@ -2,33 +2,37 @@ services: gitea: image: gitea/gitea:${GITEA_VERSION:-latest} container_name: ${CONTAINER_NAME:-gitea} - restart: always + restart: unless-stopped environment: - USER_UID=${USER_UID:-1000} - USER_GID=${USER_GID:-1000} + - TZ=${TZ:-UTC} # Gitea configuration via environment variables - GITEA__database__DB_TYPE=${DB_TYPE:-sqlite3} - GITEA__server__DOMAIN=${SERVICE_DOMAIN} - GITEA__server__SSH_DOMAIN=${SSH_DOMAIN:-${SERVICE_DOMAIN}} + - GITEA__server__SSH_PORT=${SSH_PORT:-2223} + - GITEA__server__SSH_LISTEN_PORT=22 - GITEA__server__ROOT_URL=https://${SERVICE_DOMAIN} + - GITEA__webhook__ALLOWED_HOST_LIST=${GITEA_WEBHOOK_ALLOWED_HOST_LIST:-private,loopback,external} + ports: + - "${SSH_PORT:-2223}:22" volumes: - - ${DATA_PATH:-./data}:/data - - /etc/timezone:/etc/timezone:ro - - /etc/localtime:/etc/localtime:ro + - ./data:/data networks: - proxy-net labels: - "traefik.enable=true" # WebSecure Router - "traefik.http.routers.${CONTAINER_NAME:-gitea}.rule=Host(`${SERVICE_DOMAIN}`)" - - "traefik.http.routers.${CONTAINER_NAME:-gitea}.entrypoints=websecure" + - "traefik.http.routers.${CONTAINER_NAME:-gitea}.entrypoints=${HTTPS_ENTRYPOINT:-websecure}" - "traefik.http.routers.${CONTAINER_NAME:-gitea}.tls=true" - - "traefik.http.routers.${CONTAINER_NAME:-gitea}.middlewares=${AUTH_MIDDLEWARE}" + - "traefik.http.routers.${CONTAINER_NAME:-gitea}.tls.certresolver=${CERT_RESOLVER:-myresolver}" - "traefik.http.routers.${CONTAINER_NAME:-gitea}.service=${CONTAINER_NAME:-gitea}-svc" # HTTP to HTTPS Redirect Router - "traefik.http.routers.${CONTAINER_NAME:-gitea}-red.rule=Host(`${SERVICE_DOMAIN}`)" - - "traefik.http.routers.${CONTAINER_NAME:-gitea}-red.entrypoints=web" - - "traefik.http.routers.${CONTAINER_NAME:-gitea}-red.middlewares=${HTTPS_REDIRECT_MIDDLEWARE}" + - "traefik.http.routers.${CONTAINER_NAME:-gitea}-red.entrypoints=${HTTP_ENTRYPOINT:-web}" + - "traefik.http.routers.${CONTAINER_NAME:-gitea}-red.middlewares=${HTTPS_REDIRECT_MIDDLEWARE:-https-redirect@docker}" # Service definition - "traefik.http.services.${CONTAINER_NAME:-gitea}-svc.loadbalancer.server.port=3000" diff --git a/gitea_runner/app.yaml b/gitea_runner/app.yaml new file mode 100644 index 0000000..76a786f --- /dev/null +++ b/gitea_runner/app.yaml @@ -0,0 +1,17 @@ +schemaVersion: "1.0" +name: "gitea_runner" +aliases: + - "act_runner" + - "runner" +domain: "internal" +description: "Standalone Gitea Actions CI/CD Runner" +visible: false +auth: false +networks: + - proxy-net +deployment: + strategy: "compose" + branch: "main" + actions: + - git_pull + - compose_up diff --git a/gitea_runner/docker-compose.yml b/gitea_runner/docker-compose.yml new file mode 100644 index 0000000..87ff5e7 --- /dev/null +++ b/gitea_runner/docker-compose.yml @@ -0,0 +1,20 @@ +services: + gitea_runner: + image: gitea/act_runner:${ACT_RUNNER_VERSION:-latest} + container_name: ${CONTAINER_NAME:-gitea-runner} + restart: unless-stopped + environment: + - GITEA_INSTANCE_URL=${GITEA_INSTANCE_URL:-http://gitea:3000} + - GITEA_RUNNER_REGISTRATION_TOKEN=${GITEA_RUNNER_TOKEN:-} + - GITEA_RUNNER_NAME=${GITEA_RUNNER_NAME:-homelab-runner} + - GITEA_RUNNER_LABELS=${GITEA_RUNNER_LABELS:-ubuntu-latest:docker://ghcr.io/catthehacker/ubuntu:act-latest,ubuntu-22.04:docker://ghcr.io/catthehacker/ubuntu:act-latest} + - DOCKER_HOST=${DOCKER_HOST:-tcp://docker-socket-proxy:2375} + volumes: + - ./data:/data + networks: + - proxy-net + +networks: + proxy-net: + name: ${PROXY_NETWORK:-proxy-net} + external: true diff --git a/jellyfin/app.yaml b/jellyfin/app.yaml new file mode 100644 index 0000000..a1dd57d --- /dev/null +++ b/jellyfin/app.yaml @@ -0,0 +1,21 @@ +schemaVersion: "1.0" +name: "jellyfin" +aliases: + - "media" +description: "Media Server & Streaming Hub" +visible: true +auth: true +networks: + - proxy-net +deployment: + strategy: "compose" + branch: "main" + actions: + - git_pull + - compose_up +homepage: + title: "Jellyfin" + group: "Media & Productivity" + icon: "jellyfin.png" + container: "jellyfin" + weight: 10 diff --git a/jellyfin/docker-compose.yml b/jellyfin/docker-compose.yml index cf553ad..748f8fa 100644 --- a/jellyfin/docker-compose.yml +++ b/jellyfin/docker-compose.yml @@ -8,33 +8,33 @@ services: volumes: - ./config:/config - ./cache:/cache - - ${MEDIA_PATH}:/media:ro + - ./media:/media:ro restart: unless-stopped networks: - - proxy + - proxy-net labels: - "traefik.enable=true" # HTTPS Router - - "traefik.http.routers.${SERVICE_NAME}.rule=Host(`${SERVICE_DOMAIN}`)" - - "traefik.http.routers.${SERVICE_NAME}.entrypoints=${HTTPS_ENTRYPOINT:-websecure}" - - "traefik.http.routers.${SERVICE_NAME}.tls=true" - - "traefik.http.routers.${SERVICE_NAME}.tls.certresolver=${CERT_RESOLVER:-letsencrypt}" - - "traefik.http.routers.${SERVICE_NAME}.middlewares=${SERVICE_NAME}-ratelimit@docker" - - "traefik.http.routers.${SERVICE_NAME}.service=${SERVICE_NAME}-svc" + - "traefik.http.routers.${CONTAINER_NAME:-jellyfin}.rule=Host(`${SERVICE_DOMAIN}`)" + - "traefik.http.routers.${CONTAINER_NAME:-jellyfin}.entrypoints=${HTTPS_ENTRYPOINT:-websecure}" + - "traefik.http.routers.${CONTAINER_NAME:-jellyfin}.tls=true" + - "traefik.http.routers.${CONTAINER_NAME:-jellyfin}.tls.certresolver=${CERT_RESOLVER:-myresolver}" + - "traefik.http.routers.${CONTAINER_NAME:-jellyfin}.middlewares=${CONTAINER_NAME:-jellyfin}-ratelimit@docker" + - "traefik.http.routers.${CONTAINER_NAME:-jellyfin}.service=${CONTAINER_NAME:-jellyfin}-svc" # Rate Limit Middleware - - "traefik.http.middlewares.${SERVICE_NAME}-ratelimit.ratelimit.average=${RATE_LIMIT_AVG:-100}" - - "traefik.http.middlewares.${SERVICE_NAME}-ratelimit.ratelimit.burst=${RATE_LIMIT_BURST:-50}" + - "traefik.http.middlewares.${CONTAINER_NAME:-jellyfin}-ratelimit.ratelimit.average=${RATE_LIMIT_AVG:-100}" + - "traefik.http.middlewares.${CONTAINER_NAME:-jellyfin}-ratelimit.ratelimit.burst=${RATE_LIMIT_BURST:-50}" # HTTP to HTTPS Redirect - - "traefik.http.routers.${SERVICE_NAME}-red.rule=Host(`${SERVICE_DOMAIN}`)" - - "traefik.http.routers.${SERVICE_NAME}-red.entrypoints=${HTTP_ENTRYPOINT:-web}" - - "traefik.http.routers.${SERVICE_NAME}-red.middlewares=https-redirect@docker" + - "traefik.http.routers.${CONTAINER_NAME:-jellyfin}-red.rule=Host(`${SERVICE_DOMAIN}`)" + - "traefik.http.routers.${CONTAINER_NAME:-jellyfin}-red.entrypoints=${HTTP_ENTRYPOINT:-web}" + - "traefik.http.routers.${CONTAINER_NAME:-jellyfin}-red.middlewares=${HTTPS_REDIRECT_MIDDLEWARE:-https-redirect@docker}" # Service definition - - "traefik.http.services.${SERVICE_NAME}-svc.loadbalancer.server.port=8096" + - "traefik.http.services.${CONTAINER_NAME:-jellyfin}-svc.loadbalancer.server.port=8096" networks: - proxy: + proxy-net: name: ${PROXY_NETWORK:-proxy-net} external: true diff --git a/learning/.dockerignore b/learning/.dockerignore deleted file mode 100644 index a218a47..0000000 --- a/learning/.dockerignore +++ /dev/null @@ -1,5 +0,0 @@ -__pycache__/ -*.db -data/ -Dockerfile -docker-compose.yml diff --git a/learning/.env-example b/learning/.env-example deleted file mode 100644 index 28edf61..0000000 --- a/learning/.env-example +++ /dev/null @@ -1,19 +0,0 @@ -# --- Service Configuration --- -SERVICE_NAME=learning-hub -SERVICE_DOMAIN=learning.arch-services.mywire.org -APP_PORT=8000 - -# --- Infrastructure Networks --- -# The name of the external network where Traefik is running -PROXY_NETWORK=proxy-net -# The name of the external network for the Docker socket proxy -SOCKET_PROXY_NETWORK=socket-net - -# --- Application Secrets --- -# Optional: Turso (libSQL) configuration. -# If empty, the app falls back to local SQLite at ./data/learning.db -TURSO_DATABASE_URL=libsql://your-db-name.turso.io -TURSO_AUTH_TOKEN=your_secure_token_here - -# --- System Configuration --- -DOCKER_HOST=tcp://socket-proxy:2375 diff --git a/learning/.gitignore b/learning/.gitignore deleted file mode 100644 index 9aa15de..0000000 --- a/learning/.gitignore +++ /dev/null @@ -1,28 +0,0 @@ -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class - -# Environments -.env -.venv -env/ -venv/ -ENV/ - -# Databases -data/*.db -data/*.sqlite3 - -# Docker -.docker/ -*.log - -# OS generated files -.DS_Store -.DS_Store? -._* -.Spotlight-V100 -.Trashes -ehthumbs.db -Thumbs.db diff --git a/learning/Dockerfile b/learning/Dockerfile deleted file mode 100644 index 2eb70ea..0000000 --- a/learning/Dockerfile +++ /dev/null @@ -1,18 +0,0 @@ -FROM ghcr.io/astral-sh/uv:python3.11-bookworm-slim - -WORKDIR /app - -# Enable bytecode compilation -ENV UV_COMPILE_BYTECODE=1 - -# Copy from build context -COPY pyproject.toml uv.lock* ./ - -# Install the project's dependencies -RUN uv sync --frozen --no-install-project --no-dev - -# Copy the rest of the application -COPY . . - -# Run the application -CMD ["uv", "run", "uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"] diff --git a/learning/README.md b/learning/README.md deleted file mode 100644 index ea0aac3..0000000 --- a/learning/README.md +++ /dev/null @@ -1,51 +0,0 @@ -# Learning Hub - -A FastAPI-based service for managing courses and monitoring system infrastructure. Refactored into a layered architecture for maintainability and type-safety. - ---- - -## 🌟 Features - -- **Layered Architecture**: Separation of concerns between Config, Database, Models, Controllers, and Routes. -- **Turso Integration**: Support for LibSQL (Turso) cloud databases with local SQLite fallback. -- **System Monitoring**: CPU, RAM, and Disk usage statistics. -- **Docker Integration**: Monitor status of other containerized services. -- **Strict Typing**: Verified with `pyright` in strict mode. -- **UV Powered**: Managed by `uv` for fast, reproducible builds. - ---- - -## πŸ› οΈ Development - -The project uses `uv` for dependency management. - -```bash -# Install dependencies -uv sync - -# Run tests -uv run python -m unittest discover tests - -# Run type checking -uv run pyright -``` - ---- - -## πŸš€ Deployment - -This service is managed as part of the unified Traefik deployments stack. - -To start: -```bash -appctl up learning -``` - -Refer to the root [README.md](../README.md) for details on how environment variables are securely injected at runtime. - ---- - -## πŸ“¦ Volumes - -- `./data`: Stores the local SQLite database if no remote URL is provided. -- `/home`: Mounted as read-only for system statistics monitoring. diff --git a/learning/app/config.py b/learning/app/config.py deleted file mode 100644 index 702c3c1..0000000 --- a/learning/app/config.py +++ /dev/null @@ -1,20 +0,0 @@ -from pydantic_settings import BaseSettings, SettingsConfigDict -from typing import Optional - -class Settings(BaseSettings): - # Service Configuration - SERVICE_NAME: str = "learning-hub" - SERVICE_DOMAIN: str = "learning.example.com" - APP_PORT: int = 8000 - - # Infrastructure Networks - PROXY_NETWORK: str = "proxy-net" - - # Application Secrets (Turso) - TURSO_DATABASE_URL: Optional[str] = None - TURSO_AUTH_TOKEN: Optional[str] = None - - model_config = SettingsConfigDict(env_file=".env", extra="ignore") - -settings = Settings() - diff --git a/learning/app/controllers.py b/learning/app/controllers.py deleted file mode 100644 index 8a1e403..0000000 --- a/learning/app/controllers.py +++ /dev/null @@ -1,36 +0,0 @@ -from typing import List, Optional -from sqlalchemy.orm import Session -from . import models - -# --- Course CRUD --- - -def get_courses(db: Session) -> List[models.ORMCourse]: - return list(db.query(models.ORMCourse).all()) - -def create_course(db: Session, course: models.CourseCreate) -> models.ORMCourse: - db_course = models.ORMCourse(**course.model_dump()) - db.add(db_course) - db.commit() - db.refresh(db_course) - return db_course - -def update_course(db: Session, course_id: int, course: models.CourseCreate) -> Optional[models.ORMCourse]: - db_course = db.query(models.ORMCourse).filter(models.ORMCourse.id == course_id).first() - if not db_course: - return None - - for key, value in course.model_dump().items(): - setattr(db_course, key, value) - - db.commit() - db.refresh(db_course) - return db_course - -def delete_course(db: Session, course_id: int) -> bool: - db_course = db.query(models.ORMCourse).filter(models.ORMCourse.id == course_id).first() - if not db_course: - return False - db.delete(db_course) - db.commit() - return True - diff --git a/learning/app/database.py b/learning/app/database.py deleted file mode 100644 index 73f7c3f..0000000 --- a/learning/app/database.py +++ /dev/null @@ -1,58 +0,0 @@ -import os -from sqlalchemy import create_engine, event -from sqlalchemy.engine import ExceptionContext -from sqlalchemy.orm import sessionmaker, DeclarativeBase, Session -from typing import Generator -from .config import settings - -def get_database_url() -> str: - if settings.TURSO_DATABASE_URL and settings.TURSO_AUTH_TOKEN: - # Normalize URL scheme for sqlalchemy-libsql (requires sqlite+libsql://) - clean_url = settings.TURSO_DATABASE_URL - if clean_url.startswith("https://"): - clean_url = clean_url[8:] - elif clean_url.startswith("http://"): - clean_url = clean_url[7:] - elif clean_url.startswith("libsql://"): - clean_url = clean_url[9:] - - return f"sqlite+libsql://{clean_url}?secure=true" - else: - # Offline Fallback to Local SQLite - DB_DIR = "./data" - os.makedirs(DB_DIR, exist_ok=True) - return f"sqlite:///{DB_DIR}/learning.db" - -SQLALCHEMY_DATABASE_URL = get_database_url() - -if settings.TURSO_DATABASE_URL and settings.TURSO_AUTH_TOKEN: - engine = create_engine( - SQLALCHEMY_DATABASE_URL, - connect_args={ - "auth_token": settings.TURSO_AUTH_TOKEN, - }, - pool_pre_ping=True, - pool_recycle=300, - ) - - @event.listens_for(engine, "handle_error") - def handle_exception(context: ExceptionContext) -> None: - orig = context.original_exception - if orig and any(msg in str(orig) for msg in ("stream not found", "WebSocket was closed", "closed websocket")): - context.is_disconnect = True -else: - engine = create_engine( - SQLALCHEMY_DATABASE_URL, connect_args={"check_same_thread": False} - ) - -SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine) - -class Base(DeclarativeBase): - pass - -def get_db() -> Generator[Session, None, None]: - db = SessionLocal() - try: - yield db - finally: - db.close() diff --git a/learning/app/main.py b/learning/app/main.py deleted file mode 100644 index 8320d87..0000000 --- a/learning/app/main.py +++ /dev/null @@ -1,61 +0,0 @@ -import uvicorn -from fastapi import FastAPI -from fastapi.middleware.cors import CORSMiddleware -from contextlib import asynccontextmanager -from typing import AsyncGenerator -from . import models, database, routes - -@asynccontextmanager -async def lifespan(app: FastAPI) -> AsyncGenerator[None, None]: - # Create tables - models.Base.metadata.create_all(bind=database.engine) - - # Seed initial data if empty - db = database.SessionLocal() - try: - if db.query(models.ORMCourse).count() == 0: - initial_courses = [ - models.ORMCourse( - title="Desarrollo Backend con Python", - description="Platzi Learning Path", - main_link="https://platzi.com/mis-rutas/16609931/", - status="WIP" - ), - models.ORMCourse( - title="Amazon Junior Software Developer", - description="Coursera Professional Certificate", - main_link="https://www.coursera.org/professional-certificates/amazon-junior-software-developer", - status="WIP" - ), - models.ORMCourse( - title="Software Design and Architecture", - description="Coursera Specialization", - main_link="https://www.coursera.org/specializations/software-design-architecture", - status="WIP" - ) - ] - db.add_all(initial_courses) - db.commit() - finally: - db.close() - - yield - -app = FastAPI(title="Learning Hub API", lifespan=lifespan) - -app.add_middleware( - CORSMiddleware, - allow_origins=["*"], - allow_credentials=True, - allow_methods=["*"], - allow_headers=["*"], -) - -app.include_router(routes.router) - -@app.get("/") -def read_root() -> dict[str, str]: - return {"message": "Learning Hub API is running. Use the main dashboard to access the Kanban board."} - -if __name__ == "__main__": - uvicorn.run("app.main:app", host="0.0.0.0", port=8000, reload=False) diff --git a/learning/app/models.py b/learning/app/models.py deleted file mode 100644 index 9bb8bf0..0000000 --- a/learning/app/models.py +++ /dev/null @@ -1,33 +0,0 @@ -from typing import Optional -from pydantic import BaseModel, ConfigDict -from sqlalchemy.orm import Mapped, mapped_column -from .database import Base - -# --- SQLAlchemy ORM Models --- - -class ORMCourse(Base): - __tablename__ = "courses" - - id: Mapped[int] = mapped_column(primary_key=True, index=True) - title: Mapped[str] = mapped_column() - description: Mapped[Optional[str]] = mapped_column(nullable=True) - main_link: Mapped[str] = mapped_column() - last_link: Mapped[Optional[str]] = mapped_column(nullable=True) - status: Mapped[str] = mapped_column(default="Planning") # WIP, Planning, Archive - -# --- Pydantic Validation Models --- - -class CourseBase(BaseModel): - title: str - description: Optional[str] = None - main_link: str - last_link: Optional[str] = None - status: str = "Planning" - -class CourseCreate(CourseBase): - pass - -class Course(CourseBase): - id: int - - model_config = ConfigDict(from_attributes=True) diff --git a/learning/app/routes.py b/learning/app/routes.py deleted file mode 100644 index 85f9ccf..0000000 --- a/learning/app/routes.py +++ /dev/null @@ -1,28 +0,0 @@ -from fastapi import APIRouter, Depends, HTTPException -from sqlalchemy.orm import Session -from typing import List, Dict -from . import models, controllers, database - -router = APIRouter(prefix="/api") - -@router.get("/courses", response_model=List[models.Course]) -def read_courses(db: Session = Depends(database.get_db)) -> List[models.ORMCourse]: - return controllers.get_courses(db) - -@router.post("/courses", response_model=models.Course) -def create_course(course: models.CourseCreate, db: Session = Depends(database.get_db)) -> models.ORMCourse: - return controllers.create_course(db, course) - -@router.put("/courses/{course_id}", response_model=models.Course) -def update_course(course_id: int, course: models.CourseCreate, db: Session = Depends(database.get_db)) -> models.ORMCourse: - db_course = controllers.update_course(db, course_id, course) - if not db_course: - raise HTTPException(status_code=404, detail="Course not found") - return db_course - -@router.delete("/courses/{course_id}") -def delete_course(course_id: int, db: Session = Depends(database.get_db)) -> Dict[str, str]: - success = controllers.delete_course(db, course_id) - if not success: - raise HTTPException(status_code=404, detail="Course not found") - return {"message": "Course deleted"} diff --git a/learning/docker-compose.yml b/learning/docker-compose.yml deleted file mode 100644 index 0575872..0000000 --- a/learning/docker-compose.yml +++ /dev/null @@ -1,33 +0,0 @@ -services: - app: - build: . - container_name: ${SERVICE_NAME} - restart: unless-stopped - volumes: - - ./data:/app/data - environment: - - TURSO_DATABASE_URL=${TURSO_DATABASE_URL} - - TURSO_AUTH_TOKEN=${TURSO_AUTH_TOKEN} - networks: - - proxy - labels: - - "traefik.enable=true" - # HTTPS Router - - "traefik.http.routers.${SERVICE_NAME}.rule=Host(`${SERVICE_DOMAIN}`)" - - "traefik.http.routers.${SERVICE_NAME}.entrypoints=websecure" - - "traefik.http.routers.${SERVICE_NAME}.tls=true" - - "traefik.http.routers.${SERVICE_NAME}.service=${SERVICE_NAME}-svc" - - # HTTP to HTTPS Redirect - - "traefik.http.routers.${SERVICE_NAME}-red.rule=Host(`${SERVICE_DOMAIN}`)" - - "traefik.http.routers.${SERVICE_NAME}-red.entrypoints=web" - - "traefik.http.routers.${SERVICE_NAME}-red.middlewares=https-redirect@docker" - - # Service Definition - - "traefik.http.services.${SERVICE_NAME}-svc.loadbalancer.server.port=${APP_PORT:-8000}" - -networks: - proxy: - name: ${PROXY_NETWORK} - external: true - diff --git a/learning/docs/turso-stale-connection-incident.md b/learning/docs/turso-stale-connection-incident.md deleted file mode 100644 index f7e66b9..0000000 --- a/learning/docs/turso-stale-connection-incident.md +++ /dev/null @@ -1,554 +0,0 @@ -# Turso / SQLAlchemy Stale Connection Failure - -## Context - -The application worked normally most of the time, but periodically the API would begin returning database-related 500 errors. Restarting the service restored normal operation, but the underlying cause was initially unclear. - -The important failure was: - -ValueError: Hrana: `api error: status=404 Not Found, -body={"error":"stream not found: 112ed9b2:3d0910"}` - -The error occurred while executing an otherwise normal query: - -db.query(models.ORMCourse).all() - -The traceback showed the failure propagating through SQLAlchemy and the database driver until it became a ValueError originating from Hrana. - -1. The Mental Model: What Is a Database Connection? - -A database connection is not a pointer to the database or to a particular piece of data. - -It is better understood as a reusable communication channel/handle through which the application and database exchange messages. - -Conceptually: - -Application - β”‚ - β”‚ database protocol messages - β–Ό -Connection - β”‚ - β–Ό -Database server - -For a remote database, several layers can exist underneath the database connection abstraction: - -SQLAlchemy Connection - β”‚ - β–Ό -Database driver - β”‚ - β–Ό -Hrana - β”‚ - β–Ό -WebSocket - β”‚ - β–Ό -Network - β”‚ - β–Ό -Turso - -A SQL statement such as: - -SELECT * FROM courses; - -is a message sent through a connection. The connection is not the query itself and does not contain the database's data. - -2. Why SQLAlchemy Uses a Connection Pool - -Opening a connection can require establishing network and protocol state, authenticating, and performing other setup work. - -Creating a new connection for every request would therefore be wasteful: - -Request 1 β†’ open connection β†’ query β†’ close -Request 2 β†’ open connection β†’ query β†’ close -Request 3 β†’ open connection β†’ query β†’ close - -SQLAlchemy instead maintains a connection pool. - -The pool contains multiple reusable connections to the same database: - - Turso - β–² - β”Œβ”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β” - β”‚ β”‚ β”‚ - Conn A Conn B Conn C - β–² β–² β–² - β””β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”˜ - β”‚ - Connection Pool - -A request can borrow a connection: - -Request - β”‚ - β–Ό -Pool - β”‚ - β–Ό -Connection B - β”‚ - β–Ό -execute SQL - -When the request finishes, the connection can be returned to the pool and reused by another request. - -Important consequence - -A connection in a pool may remain alive for much longer than the request that originally used it. - -Therefore: - -A connection can become stale while sitting inside the pool. - -This is the central concept behind the incident. - -3. What Went Wrong - -The application was using a remote Turso database through the Hrana protocol. - -The important conceptual chain was: - -FastAPI - β”‚ - β–Ό -SQLAlchemy Session - β”‚ - β–Ό -SQLAlchemy Engine - β”‚ - β–Ό -Connection Pool - β”‚ - β–Ό -Database Connection - β”‚ - β–Ό -Hrana / WebSocket - β”‚ - β–Ό -Turso - -A pooled connection could become invalid independently of the Python process. - -For example: - -Connection Pool - -β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” -β”‚ Connection A β†’ healthy β”‚ -β”‚ Connection B β†’ healthy β”‚ -β”‚ Connection C β†’ healthy β”‚ -β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ - -Later, the underlying communication associated with Connection B could disappear or become invalid: - -Connection Pool - -β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” -β”‚ Connection A β†’ healthy β”‚ -β”‚ Connection B β†’ stale/dead β”‚ -β”‚ Connection C β†’ healthy β”‚ -β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ - -The pool could still contain a connection object representing B. - -A later request could therefore receive B: - -GET /api/courses - β”‚ - β–Ό -borrow Connection B - β”‚ - β–Ό -execute SELECT - β”‚ - β–Ό -Hrana - β”‚ - β–Ό -"stream not found" - -The database itself was not necessarily unavailable. The problem was that the application attempted to use an invalid communication state. - -4. Why the Error Was Intermittent - -This explains why the dashboard could work normally and then suddenly fail. - -Suppose the pool contains: - -A β†’ healthy -B β†’ stale -C β†’ healthy - -Requests using A or C succeed: - -Request β†’ A β†’ success -Request β†’ C β†’ success -Request β†’ A β†’ success - -A request that receives B fails: - -Request β†’ B β†’ "stream not found" - -This produces an apparently random failure from the API's perspective. - -It also explains why restarting the service appeared to fix the problem. - -A restart destroys the old: - -SQLAlchemy engine - -connection pool - -connection objects - -underlying driver state - -The new process creates fresh connections and therefore fresh communication state. - -5. Why pool_pre_ping=True Was Added - -The first change was: - -pool_pre_ping=True - -The purpose is to test a pooled connection before reusing it. - -Without a health check: - -borrow connection - β”‚ - β–Ό -assume it is valid - β”‚ - β–Ό -execute query - β”‚ - β–Ό -possible stale-connection failure - -With pre-ping: - -borrow connection - β”‚ - β–Ό -test connection - β”‚ - β”Œβ”€β”€β”΄β”€β”€β” - β”‚ β”‚ -healthy dead - β”‚ β”‚ - β”‚ β–Ό - β”‚ discard / - β”‚ replace - β”‚ - β–Ό -execute query - -The important idea is: - -A connection retrieved from a pool is not automatically guaranteed to still be usable. - -pool_pre_ping makes SQLAlchemy perform a liveness check before trusting a pooled connection. - -6. Why pool_recycle=300 Was Added - -The second change was: - -pool_recycle=300 - -This puts an age limit on pooled connections. - -Conceptually: - -Connection created - β”‚ - β–Ό - 0 s - β”‚ - β”‚ - β–Ό - 300 s - β”‚ - β–Ό -connection is recycled - -This is different from pool_pre_ping. - -pool_pre_ping - -Asks: - -"Is this connection still usable?" - -pool_recycle - -Asks: - -"Has this connection been around long enough that we should replace it?" - -So pool_recycle is a preventative measure against keeping connections alive indefinitely. - -7. Why a Custom handle_error Listener Was Needed - -The third and most specific change was: - -from sqlalchemy import event -from sqlalchemy.engine import ExceptionContext - -followed by: - -@event.listens_for(engine, "handle_error") -def handle_exception(context: ExceptionContext) -> None: - orig = context.original_exception - - if orig and any( - msg in str(orig) - for msg in ( - "stream not found", - "WebSocket was closed", - "closed websocket", - ) - ): - context.is_disconnect = True - -This exists because the database driver produced a Hrana-specific error: - -ValueError: -Hrana: api error: status=404 -... -"stream not found" - -The important part is that this error is not necessarily represented by an exception type that SQLAlchemy automatically recognizes as a disconnected database connection. - -SQLAlchemy therefore needs help interpreting this particular error. - -The handler effectively tells SQLAlchemy: - -"When this specific Hrana/WebSocket failure occurs, consider the connection disconnected." - -Setting: - -context.is_disconnect = True - -allows SQLAlchemy's connection-management machinery to treat the connection as invalid rather than as an ordinary query error. - -Conceptually: - -Hrana - β”‚ - β–Ό -"stream not found" - β”‚ - β–Ό -driver raises exception - β”‚ - β–Ό -SQLAlchemy handle_error - β”‚ - β–Ό -recognize Hrana disconnect - β”‚ - β–Ό -context.is_disconnect = True - β”‚ - β–Ό -connection is invalidated - β”‚ - β–Ό -fresh connection can be established - -This is preferable to putting special reconnect logic inside individual CRUD endpoints. - -8. Why These Three Changes Complement Each Other - -The three changes operate at different points in the connection lifecycle. - -Change - -Main purpose - -pool_pre_ping=True - -Detect stale connections before reusing them - -pool_recycle=300 - -Prevent connections from remaining in the pool indefinitely - -handle_error + is_disconnect=True - -Teach SQLAlchemy that specific Hrana/WebSocket errors mean the connection is dead - -Together: - - CONNECTION POOL - β”‚ - β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” - β”‚ β”‚ - recycle age pre-ping - β”‚ β”‚ - β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ - β”‚ - stale connection - β”‚ - β–Ό - Hrana failure - β”‚ - β–Ό - handle_error - β”‚ - β–Ό - mark as disconnect - β”‚ - β–Ό - invalidate connection - β”‚ - β–Ό - establish fresh one - -The goal is not to make connections immortal. - -The goal is to make the application resilient to connection failure. - -9. What Was Actually "Wrong" With the Original Application? - -The CRUD code itself was not fundamentally wrong. - -For example: - -def get_courses(db: Session): - return list(db.query(models.ORMCourse).all()) - -is a normal use of SQLAlchemy. - -The problem was an implicit assumption: - -"If SQLAlchemy gives me a connection from its pool, that connection is still valid." - -That assumption can fail with long-lived remote connections. - -The more useful backend lesson is: - -A connection pool is a cache of reusable communication channels, and cached connections can become stale. - -This is broader and more useful than memorizing pool_pre_ping. - -10. What the Error Does and Does Not Prove - -The observed error was: - -stream not found - -This establishes that the client attempted to use a Hrana stream that Turso no longer recognized. - -It strongly supports the stale/invalid connection explanation. - -However, the traceback alone does not establish the precise reason why the stream became invalid. - -Possible underlying causes could include: - -WebSocket interruption - -network interruption - -server-side stream cleanup or expiration - -another connection-lifecycle event - -Therefore the diagnosis should distinguish between: - -Established - -The application attempted to use an invalid Hrana stream. - -Strong inference - -A stale pooled connection was reused. - -Not established from this evidence alone - -The exact event that caused Turso to discard the stream. - -This distinction is important when debugging infrastructure problems. - -11. Debugging Lesson - -The failure initially appeared to be: - -/api/courses is randomly returning 500 - -But the useful debugging path was to follow the exception downward: - -HTTP request - ↓ -FastAPI route - ↓ -controller - ↓ -SQLAlchemy Session - ↓ -SQLAlchemy Connection - ↓ -database driver - ↓ -Hrana - ↓ -"stream not found" - -The lower-level error contained more information than the HTTP 500. - -When debugging database failures, investigate not only: - -"What SQL query failed?" - -but also: - -"What communication channel was being used to execute it, and what is its lifecycle?" - -That distinction is particularly important for remote databases and connection pools. - -12. Final Mental Model - -The most useful mental model for this incident is: - -Database - β”‚ - β”‚ stores data - β”‚ - β–Ό -Connection - β”‚ - β”‚ communication channel / handle - β”‚ - β–Ό -Connection Pool - β”‚ - β”‚ caches reusable connections - β”‚ - β–Ό -SQLAlchemy - β”‚ - β”‚ borrows connections for database work - β”‚ - β–Ό -Application - -A connection is not the data. - -A connection is not the query. - -A connection is not merely a pointer to a database. - -It is a reusable means of communicating with the database, represented to the application by a connection object and backed by lower-level protocol/network state. - -The incident happened because that communication state could become invalid while the corresponding connection remained available to SQLAlchemy's pool. - -The fix therefore belongs at the connection-management layer rather than in the CRUD logic. - - - diff --git a/learning/pyproject.toml b/learning/pyproject.toml deleted file mode 100644 index 32cb41e..0000000 --- a/learning/pyproject.toml +++ /dev/null @@ -1,25 +0,0 @@ -[project] -name = "learning-hub" -version = "0.1.0" -description = "Learning Hub API" -readme = "README.md" -requires-python = ">=3.11" -dependencies = [ - "fastapi>=0.100.0", - "uvicorn>=0.23.0", - "sqlalchemy>=2.0.0", - "sqlalchemy-libsql>=0.2.0", - "pydantic-settings>=2.0.0", -] - -[dependency-groups] -dev = [ - "pyright>=1.1.0", - "httpx>=0.24.0", -] - -[tool.pyright] -typeCheckingMode = "strict" -include = ["app"] -exclude = ["**/__pycache__", ".venv", "**/.venv"] -pythonVersion = "3.11" diff --git a/learning/tests/test_endpoints.py b/learning/tests/test_endpoints.py deleted file mode 100644 index aae0611..0000000 --- a/learning/tests/test_endpoints.py +++ /dev/null @@ -1,110 +0,0 @@ -import unittest -from fastapi.testclient import TestClient -from sqlalchemy import create_engine -from sqlalchemy.orm import sessionmaker -from sqlalchemy.pool import StaticPool - -from app.main import app -from app.database import Base, get_db -from app.models import ORMCourse - -# Setup test database (in-memory SQLite) -SQLALCHEMY_DATABASE_URL = "sqlite://" - -engine = create_engine( - SQLALCHEMY_DATABASE_URL, - connect_args={"check_same_thread": False}, - poolclass=StaticPool, -) -TestingSessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine) - -def override_get_db(): - try: - db = TestingSessionLocal() - yield db - finally: - db.close() - -app.dependency_overrides[get_db] = override_get_db - -class TestLearningHub(unittest.TestCase): - def setUp(self): - Base.metadata.create_all(bind=engine) - self.client = TestClient(app) - - # Seed test data - db = TestingSessionLocal() - db.add(ORMCourse( - title="Test Course", - description="Test Description", - main_link="http://test.com", - status="Planning" - )) - db.commit() - db.close() - - def tearDown(self): - Base.metadata.drop_all(bind=engine) - - def test_read_root(self): - response = self.client.get("/") - self.assertEqual(response.status_code, 200) - self.assertEqual(response.json(), {"message": "Learning Hub API is running. Use the main dashboard to access the Kanban board."}) - - def test_get_courses(self): - response = self.client.get("/api/courses") - self.assertEqual(response.status_code, 200) - data = response.json() - self.assertEqual(len(data), 1) - self.assertEqual(data[0]["title"], "Test Course") - - def test_create_course(self): - course_data = { - "title": "New Course", - "description": "New Desc", - "main_link": "http://new.com", - "status": "WIP" - } - response = self.client.post("/api/courses", json=course_data) - self.assertEqual(response.status_code, 200) - data = response.json() - self.assertEqual(data["title"], "New Course") - self.assertIn("id", data) - - def test_update_course(self): - update_data = { - "title": "Updated Course", - "description": "Updated Desc", - "main_link": "http://test.com", - "status": "Archive" - } - response = self.client.put("/api/courses/1", json=update_data) - self.assertEqual(response.status_code, 200) - data = response.json() - self.assertEqual(data["title"], "Updated Course") - self.assertEqual(data["status"], "Archive") - - def test_delete_course(self): - response = self.client.delete("/api/courses/1") - self.assertEqual(response.status_code, 200) - self.assertEqual(response.json(), {"message": "Course deleted"}) - - # Verify it's gone - get_response = self.client.get("/api/courses") - self.assertEqual(len(get_response.json()), 0) - - def test_system_stats(self): - response = self.client.get("/api/system-stats") - self.assertEqual(response.status_code, 200) - data = response.json() - self.assertIn("cpu", data) - self.assertIn("ram_percent", data) - - def test_bookmarks(self): - response = self.client.get("/api/bookmarks") - self.assertEqual(response.status_code, 200) - data = response.json() - self.assertIn("Developer", data) - -if __name__ == "__main__": - unittest.main() diff --git a/learning/uv.lock b/learning/uv.lock deleted file mode 100644 index 3119dc3..0000000 --- a/learning/uv.lock +++ /dev/null @@ -1,525 +0,0 @@ -version = 1 -revision = 3 -requires-python = ">=3.11" - -[[package]] -name = "annotated-doc" -version = "0.0.4" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/57/ba/046ceea27344560984e26a590f90bc7f4a75b06701f653222458922b558c/annotated_doc-0.0.4.tar.gz", hash = "sha256:fbcda96e87e9c92ad167c2e53839e57503ecfda18804ea28102353485033faa4", size = 7288, upload-time = "2025-11-10T22:07:42.062Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/1e/d3/26bf1008eb3d2daa8ef4cacc7f3bfdc11818d111f7e2d0201bc6e3b49d45/annotated_doc-0.0.4-py3-none-any.whl", hash = "sha256:571ac1dc6991c450b25a9c2d84a3705e2ae7a53467b5d111c24fa8baabbed320", size = 5303, upload-time = "2025-11-10T22:07:40.673Z" }, -] - -[[package]] -name = "annotated-types" -version = "0.7.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/ee/67/531ea369ba64dcff5ec9c3402f9f51bf748cec26dde048a2f973a4eea7f5/annotated_types-0.7.0.tar.gz", hash = "sha256:aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89", size = 16081, upload-time = "2024-05-20T21:33:25.928Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/78/b6/6307fbef88d9b5ee7421e68d78a9f162e0da4900bc5f5793f6d3d0e34fb8/annotated_types-0.7.0-py3-none-any.whl", hash = "sha256:1f02e8b43a8fbbc3f3e0d4f0f4bfc8131bcb4eebe8849b8e5c773f3a1c582a53", size = 13643, upload-time = "2024-05-20T21:33:24.1Z" }, -] - -[[package]] -name = "anyio" -version = "4.14.0" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "idna" }, - { name = "typing-extensions", marker = "python_full_version < '3.13'" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/1c/b5/001890774a9552aff22502b8da382593109ce0c95314abaebbb116567545/anyio-4.14.0.tar.gz", hash = "sha256:b47c1f9ccf73e67021df785332508f99379c68fa7d0684e8e3492cb1d4b23f89", size = 253586, upload-time = "2026-06-15T22:00:49.021Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/ba/16/9826f089383c593cdfc4a6e5aca94d9e91ae1692c57af82c3b2aa5e810f7/anyio-4.14.0-py3-none-any.whl", hash = "sha256:dd9b7a2a9799ed6552fde617b2c5df02b7fdd7d88392fc48101e51bae46164d9", size = 123506, upload-time = "2026-06-15T22:00:47.595Z" }, -] - -[[package]] -name = "certifi" -version = "2026.5.20" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/f3/ce/ee2ecad540810a79593028e88299baeae54d346cc7a0d94b6199988b89b1/certifi-2026.5.20.tar.gz", hash = "sha256:69dea482ab64caa7b9f6aba1c6bf48bb6a5448d1c0f1b17ab42ad8c763a5344d", size = 135422, upload-time = "2026-05-20T11:46:50.073Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/59/8c/57e832b7af6d7c5abe66eb3fbe3a3a32f4d11ea23a1aa7131371035be991/certifi-2026.5.20-py3-none-any.whl", hash = "sha256:3c52e209ba0a4ad7aebe60436a4ab349c39e1e602e8c134221e546902ad25897", size = 134134, upload-time = "2026-05-20T11:46:48.578Z" }, -] - -[[package]] -name = "click" -version = "8.4.1" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "colorama", marker = "sys_platform == 'win32'" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/9b/98/518d8e5081007684232226f475082b30087d0f585e8457db087298259f49/click-8.4.1.tar.gz", hash = "sha256:918b5633eddf6b41c32d4f454bf0de810065c74e3f7dbf8ee5452f8be88d3e96", size = 353007, upload-time = "2026-05-22T04:08:37.769Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/c7/0d/67e5b4109ea4a837e80daa87c2c696711955e40449a97e8926672534def2/click-8.4.1-py3-none-any.whl", hash = "sha256:482be17c6991b8c19c5429a1e995d9b0efdbb63172824c41f99965dc0ade8ec2", size = 116639, upload-time = "2026-05-22T04:08:35.26Z" }, -] - -[[package]] -name = "colorama" -version = "0.4.6" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44", size = 27697, upload-time = "2022-10-25T02:36:22.414Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335, upload-time = "2022-10-25T02:36:20.889Z" }, -] - -[[package]] -name = "fastapi" -version = "0.137.1" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "annotated-doc" }, - { name = "pydantic" }, - { name = "starlette" }, - { name = "typing-extensions" }, - { name = "typing-inspection" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/d5/b1/e5b92c59d2c37817e77c1a8c2fc1f79cdcc04c68253e5406b43e3204cba7/fastapi-0.137.1.tar.gz", hash = "sha256:822360704230d9533d8d9475399613525968aa2f0b5bd2a3ccc9f18c88fd541c", size = 408293, upload-time = "2026-06-15T11:28:20.79Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/da/35/380b9a5922f4340e51c309cde09e5bd32e62f02302971bee30dc15aa0624/fastapi-0.137.1-py3-none-any.whl", hash = "sha256:64f6983c59e45c4b9fdc44e57cb8035c2451ee91ea8e8ec042aca37de7cf6b69", size = 121877, upload-time = "2026-06-15T11:28:19.523Z" }, -] - -[[package]] -name = "greenlet" -version = "3.5.1" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/6d/6e/802acd792aebb2256fbbee8cacf2727faaeb6f240ac11008f09eae4414bc/greenlet-3.5.1.tar.gz", hash = "sha256:5a56aeb7d5d9cc4b3a735efb5095bd4b4f6f0e4f93e5ca876d0e2315137b7829", size = 197356, upload-time = "2026-05-20T15:05:03.917Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/42/3c/ff890b466eaba2b0f5e6bdfff025f8c75f41b8ffdc3dbc3d24ad261e764a/greenlet-3.5.1-cp311-cp311-macosx_11_0_universal2.whl", hash = "sha256:73f78f9b9f0a5c06e5c946ba1e8e36f5114923b6be109ee618c54f079c3ea14f", size = 284764, upload-time = "2026-05-20T13:09:10.204Z" }, - { url = "https://files.pythonhosted.org/packages/81/0e/5e5457be3d256918f6a4756f073548a3f0190836e2cc94aa6d0d617a940b/greenlet-3.5.1-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a0cbed8bb44e23c5b199f888f4e4ce096b45ad9f25ff74a7ad0213875e936bb2", size = 603479, upload-time = "2026-05-20T14:00:04.757Z" }, - { url = "https://files.pythonhosted.org/packages/6d/e1/f89a21d58d308298e6f275f13a1b472ed96c680b601a371b08be6a725989/greenlet-3.5.1-cp311-cp311-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:a203a8bd0acb0701653d3bbb26e404854a68674139ed5cbb778830f42b09bb33", size = 615495, upload-time = "2026-05-20T14:05:40.87Z" }, - { url = "https://files.pythonhosted.org/packages/2c/f2/8fd452fd81adb9ec79c8275c1375702ab0fd6bee4952da12eaa09b9508d8/greenlet-3.5.1-cp311-cp311-manylinux_2_24_s390x.manylinux_2_28_s390x.whl", hash = "sha256:6ebeb75c81211f5c702576cf81f315e77e23cfdb2c7c6fcb9dd143e6de35c360", size = 623515, upload-time = "2026-05-20T14:09:07.853Z" }, - { url = "https://files.pythonhosted.org/packages/75/de/af6cef182862d2ccd6975440d21c9058a77c3f9b469abf94e322dfd2e0e3/greenlet-3.5.1-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8a271fcd66c74615cda6a964fda3f304267a12e50a084472218a39bb0376f563", size = 614754, upload-time = "2026-05-20T13:14:24.947Z" }, - { url = "https://files.pythonhosted.org/packages/ec/bc/c318aa9f3ffc77320fddcee3d892be957b42e2ff947198d9450b004f3a38/greenlet-3.5.1-cp311-cp311-manylinux_2_39_riscv64.whl", hash = "sha256:017a544f0385d441e88714160d089d6900ef46c9eff9d99b6715a5ef2d127747", size = 418439, upload-time = "2026-05-20T14:01:38.446Z" }, - { url = "https://files.pythonhosted.org/packages/1a/c6/50e520283a9f19388a7326b05f9e8637e566003475eacaadad04f558c68d/greenlet-3.5.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:ded7b068c7c31c1a8657d4fd42d886b3e051ae29f88b80c5ff9d502257b0f071", size = 1574097, upload-time = "2026-05-20T14:02:24.003Z" }, - { url = "https://files.pythonhosted.org/packages/21/1c/13abd1f4860d987fa5e1170a01930d6e6cd40d328de487a3c9fdaff0ffd0/greenlet-3.5.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:d0932b81d72f552ded9d810d00021b64d89f2195a91ce115b893f943b7a4ab3c", size = 1641058, upload-time = "2026-05-20T13:14:31.83Z" }, - { url = "https://files.pythonhosted.org/packages/f5/56/5f332b7705545eac2dc01b4e9254d24a793f2656d55d5cc6b94ee59d22ae/greenlet-3.5.1-cp311-cp311-win_amd64.whl", hash = "sha256:88e300d136eac057b2397aa1cfd7328b4c87c7eb66a09c7bc6a1292234db474e", size = 238089, upload-time = "2026-05-20T13:14:03.229Z" }, - { url = "https://files.pythonhosted.org/packages/d9/a9/a3c2fa886c5b94863fb0e61b3bc14610b7aa94cf4f17f8741b11708305fc/greenlet-3.5.1-cp311-cp311-win_arm64.whl", hash = "sha256:cc6ab7e555c8a112ad3a76e368e86e12a2754bcae1652a5602e133ec7b635523", size = 234989, upload-time = "2026-05-20T13:08:27.715Z" }, - { url = "https://files.pythonhosted.org/packages/c4/37/4549f149c9797c21b32c2683c33522af22522099de128b2406672526d005/greenlet-3.5.1-cp312-cp312-macosx_11_0_universal2.whl", hash = "sha256:fa4f98af3a528f0c3fd592a26df7f376f93329c8f4d987f6bb979057af8bf5e2", size = 286220, upload-time = "2026-05-20T13:07:28.463Z" }, - { url = "https://files.pythonhosted.org/packages/38/ff/a4f436709716965eaab9f36ea7b906c8a927fbe32fb1372a2071d964f6b1/greenlet-3.5.1-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ffea73584b216150eab159b6d12348fb253e68757974de1e2c40d8a318ac89ed", size = 601585, upload-time = "2026-05-20T14:00:06.141Z" }, - { url = "https://files.pythonhosted.org/packages/65/ad/54bc3fcee3ad368a61b19b67d88117f7a8c29727bf71fffdeda81fbd946e/greenlet-3.5.1-cp312-cp312-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:1072b4f9edcc1e192d9283a66a3e68d6b84c561de33a83d7858beb9ba1effe10", size = 614215, upload-time = "2026-05-20T14:05:42.675Z" }, - { url = "https://files.pythonhosted.org/packages/7c/6c/de5b1b388cd2d9fbdfeab324863daba37d54e6e233ddbefd70b385a8c591/greenlet-3.5.1-cp312-cp312-manylinux_2_24_s390x.manylinux_2_28_s390x.whl", hash = "sha256:89101bfd5011e069be974903cb3a4e4523845e4ece2d62dcd8d358933c0ef249", size = 620094, upload-time = "2026-05-20T14:09:09.18Z" }, - { url = "https://files.pythonhosted.org/packages/40/69/b91cda0647df839483201545913514c2827ebea5e5ccdf931842763bc127/greenlet-3.5.1-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:add5217d68b31130f0beca584d7fef4878327d2e31642b66618a14eef312b63b", size = 611358, upload-time = "2026-05-20T13:14:26.37Z" }, - { url = "https://files.pythonhosted.org/packages/4a/43/1204baffab8a6476464795a7ccf394a3248d4f22c9f87173a15b36b6d971/greenlet-3.5.1-cp312-cp312-manylinux_2_39_riscv64.whl", hash = "sha256:e6cd99ea59dd5d89f0c956606571d79bfe6f68c9eb7f4a4083a41a7f1587edee", size = 422782, upload-time = "2026-05-20T14:01:39.597Z" }, - { url = "https://files.pythonhosted.org/packages/59/90/3cf77e080350cd02fa307bb2abf05df48f4482c240275bbd2c203ba8bb1c/greenlet-3.5.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:a5ea42a752d47a145eae922b605cd1634665ac3d5ec1e72402d5048e8d60d207", size = 1570475, upload-time = "2026-05-20T14:02:25.29Z" }, - { url = "https://files.pythonhosted.org/packages/65/2c/18cece62045e74598c3c393f70dce4a63f56222015ba29a5d4eeb04f764c/greenlet-3.5.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:c5551170cf4f5ff5623e9af81323751979fee2c731e2287b61f73cd27257b823", size = 1635625, upload-time = "2026-05-20T13:14:34.027Z" }, - { url = "https://files.pythonhosted.org/packages/30/f5/310d104ddf41eb5a70f4c268d22508dfb0c3c8e86fec152be34d0d2ed819/greenlet-3.5.1-cp312-cp312-win_amd64.whl", hash = "sha256:3c8bb982ad117d29478ef8f5533e97df21f1e2befd17a299257b0c96d1371c0b", size = 238791, upload-time = "2026-05-20T13:10:39.018Z" }, - { url = "https://files.pythonhosted.org/packages/62/90/ceca11f504cd23a8047a3dea31919adc48df9b626dd0c13f0d858734fdfd/greenlet-3.5.1-cp312-cp312-win_arm64.whl", hash = "sha256:80eb4b04dadc4e67df3fae179a32c4706a3f495bc7f22fc8a81115d5f5512188", size = 235580, upload-time = "2026-05-20T13:08:45.056Z" }, - { url = "https://files.pythonhosted.org/packages/27/69/7f7e5372d998b81001899b1c0823c957aa413ba0f2662e65821611cc31e4/greenlet-3.5.1-cp313-cp313-macosx_11_0_universal2.whl", hash = "sha256:51518ff74664078fc51bffcc6fc529b0df5ae58da192691cee765d45ce944a2b", size = 285060, upload-time = "2026-05-20T13:08:51.899Z" }, - { url = "https://files.pythonhosted.org/packages/b1/bf/387f9b6b865fd2ae0d0be09e0004827295a01b71be76ed350dd1e28a91a4/greenlet-3.5.1-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1ffdb3c0bb002c99cd8f298957e046c3dbf6006b5b7cdf11a4e19194624a0a0a", size = 604370, upload-time = "2026-05-20T14:00:07.492Z" }, - { url = "https://files.pythonhosted.org/packages/32/f5/169ce3d4e4c67291bd18f8cbe0299c9f3e45102c7f1fb3c14780c93e4532/greenlet-3.5.1-cp313-cp313-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:7715a5a2c3378ba602c3a440558261e13a820bb53a82693aacd7b7f6d964e283", size = 616987, upload-time = "2026-05-20T14:05:44.237Z" }, - { url = "https://files.pythonhosted.org/packages/19/ba/c24110c55dffa55aa6e1d98b45310da33801aeba7686ff0190fe5d46fd32/greenlet-3.5.1-cp313-cp313-manylinux_2_24_s390x.manylinux_2_28_s390x.whl", hash = "sha256:d40a890035c0058cadbdc4af7569800fd28a0e527a0fdbb7b5f9418f176846ce", size = 622911, upload-time = "2026-05-20T14:09:10.598Z" }, - { url = "https://files.pythonhosted.org/packages/ee/e5/7f2e41d5273be07e77560d61ea4e56485b4d6c316d2a84518c62d1364061/greenlet-3.5.1-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:dc71ff466927a201b08305acac451ebe1aedfcea002f62f1f2f2ac2ac1e6a135", size = 613911, upload-time = "2026-05-20T13:14:27.539Z" }, - { url = "https://files.pythonhosted.org/packages/ec/7b/d20db2e8a5ad6c038702f3179b136f93f0a3d1a21a0c0777f3e470cdf4b2/greenlet-3.5.1-cp313-cp313-manylinux_2_39_riscv64.whl", hash = "sha256:67821bb03e4e98664490edb787ff6af501194c29bbee0f5c1dfdcf1dc3d9d436", size = 425228, upload-time = "2026-05-20T14:01:40.837Z" }, - { url = "https://files.pythonhosted.org/packages/c5/a4/fbdc67579b73615a1f91615e814303cc71e06128f7baaba87be79b8fb90c/greenlet-3.5.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:cd443683db272ebaaca03af98c0b063ab30db70ea8a31a1559f35e3f7b744ccd", size = 1570689, upload-time = "2026-05-20T14:02:27.225Z" }, - { url = "https://files.pythonhosted.org/packages/e6/b4/77abbe35078be39718a46cd49caf16bceb35662f97a34101dca28aa98e47/greenlet-3.5.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:089fff7a6ce8d9316d1f65ebc00273a56be258c1725b32b94de90a3a979557e1", size = 1635602, upload-time = "2026-05-20T13:14:36.344Z" }, - { url = "https://files.pythonhosted.org/packages/37/f7/129f27ca700845b8ee8ca88ce7f43435a1239c2eddb7677fc938822762cf/greenlet-3.5.1-cp313-cp313-win_amd64.whl", hash = "sha256:110a1ca7b49b014b097f6078272c3f4ed31af45b254de5228b79adba879f6af9", size = 238683, upload-time = "2026-05-20T13:11:50.57Z" }, - { url = "https://files.pythonhosted.org/packages/6d/5c/a485a36e87df8d8fd0632ee01511244f5156a20ed3746cc6599340326395/greenlet-3.5.1-cp313-cp313-win_arm64.whl", hash = "sha256:f16ba1efc0715b680a18b8123d90dad887c6112ae3555b4b5c32c149540c6b4e", size = 235499, upload-time = "2026-05-20T13:12:42.028Z" }, - { url = "https://files.pythonhosted.org/packages/8a/cb/c62454606daf5640369c94d8a9dd540599b1bfc090e2d2180cb77f4038d2/greenlet-3.5.1-cp314-cp314-macosx_11_0_universal2.whl", hash = "sha256:d8ab31c9de8651a2facdd5c5bb0011f2380dd1a7af78ce2adf4b56095294fc07", size = 285579, upload-time = "2026-05-20T13:08:56.396Z" }, - { url = "https://files.pythonhosted.org/packages/ec/71/c4270398c2eba968a6071af1dfbdcaeee6ec1c24bc8b435b8cc452700da6/greenlet-3.5.1-cp314-cp314-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5e300185139abc337ade480c327183adf42a875ac7181bfe66d7d4efea31fbea", size = 651106, upload-time = "2026-05-20T14:00:09.448Z" }, - { url = "https://files.pythonhosted.org/packages/1a/ab/71e34b78a44ec271fb5f550c17bc46d301ddc5953890d935f270b0dcdb5a/greenlet-3.5.1-cp314-cp314-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:7ffdb990dcaa0234cf9845aead5df2e3c3a8b6507d409274dd87e0d5ab05ffc2", size = 663478, upload-time = "2026-05-20T14:05:45.88Z" }, - { url = "https://files.pythonhosted.org/packages/c6/2d/2d80842910da44f78c286532d084b8a5c3717c844ae80ceb3858738ae89a/greenlet-3.5.1-cp314-cp314-manylinux_2_24_s390x.manylinux_2_28_s390x.whl", hash = "sha256:6c09df69dc1712d131332054a858a3e5cca400967fa3a672e2324fbb0971448c", size = 667767, upload-time = "2026-05-20T14:09:12.15Z" }, - { url = "https://files.pythonhosted.org/packages/77/96/4efd6fa5c62c85426a0c19077a586258ebc3a2a146ff2493e4312a697a22/greenlet-3.5.1-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2f82b3597e9d83b63408affed0b48fd0f54935edac4302237b9a837be0dae33c", size = 660800, upload-time = "2026-05-20T13:14:29.129Z" }, - { url = "https://files.pythonhosted.org/packages/e9/d3/dad2eecedfbb1ed7050a20dcfae40c1442b74bc7423608be2c7e03ee7133/greenlet-3.5.1-cp314-cp314-manylinux_2_39_riscv64.whl", hash = "sha256:a4764e0bfc6a4d114c865b32520805c16a990ef5f286a514413b05d5ecd6a23d", size = 470786, upload-time = "2026-05-20T14:01:42.064Z" }, - { url = "https://files.pythonhosted.org/packages/7a/e0/6c71401a25cac7000261304e866a2f2cc04dc74810d40e2f118aa4799495/greenlet-3.5.1-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:c0141e37414c10164e702b8fb1473304221ad98f71600850c6ef7ff4880feba0", size = 1617518, upload-time = "2026-05-20T14:02:28.662Z" }, - { url = "https://files.pythonhosted.org/packages/41/26/c5c06643e8c0af9e7bf18e16cb51d0ab7625155f0392e1c9015d66d556cd/greenlet-3.5.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:50ae25a67bea74ea41fb14b960bc532df73eb713417b2d61892dced82fe8d3bc", size = 1681593, upload-time = "2026-05-20T13:14:39.417Z" }, - { url = "https://files.pythonhosted.org/packages/8a/bd/e11a108317485075e68af9d23039619b86b28130c3b50d227d42edece64b/greenlet-3.5.1-cp314-cp314-win_amd64.whl", hash = "sha256:8a17c42330e261299766b75ac1ea32caa437a9453c8f65d16a13140db378ecd3", size = 239800, upload-time = "2026-05-20T13:09:30.128Z" }, - { url = "https://files.pythonhosted.org/packages/47/f8/8e8e8417b7bf28639a5a56356ef934d0375e1d0c70a57e04d7701e870ffe/greenlet-3.5.1-cp314-cp314-win_arm64.whl", hash = "sha256:7b5f5fae05b8ac6d176a61b60c394a8cbdc2b5b91b81793066e68745cf165e54", size = 236862, upload-time = "2026-05-20T13:09:10.498Z" }, - { url = "https://files.pythonhosted.org/packages/90/12/41bf27fde4d3605d3773ae57751eda182b8be2f5398011c041173b1d9534/greenlet-3.5.1-cp314-cp314t-macosx_11_0_universal2.whl", hash = "sha256:ea8da1e900d758d078810d4255d8c6aa572181896a31ec79d779eb79c3adc9ad", size = 293637, upload-time = "2026-05-20T13:12:35.529Z" }, - { url = "https://files.pythonhosted.org/packages/44/44/ba14b23e9757707050c2f397d305bbcae62e5d7cad122f8b6baec5ae4a1f/greenlet-3.5.1-cp314-cp314t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a19570c52a21420dcbc94e661994bc325c0b5b11304540fed514586da5dc8f2e", size = 650840, upload-time = "2026-05-20T14:00:11.079Z" }, - { url = "https://files.pythonhosted.org/packages/a8/37/5ddc2b686a6844f91abecef43411842426da2e1573f60b49ecf2547f4ae1/greenlet-3.5.1-cp314-cp314t-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:3d955c89b75eeca4723d7cc14135f393cd47c32e2a6cb4a8e4c6e760a26b0986", size = 656416, upload-time = "2026-05-20T14:05:47.118Z" }, - { url = "https://files.pythonhosted.org/packages/8c/46/5987dcd1a2570ba84f3b187536b2ca3ae97613387e57f5cfa99df068fe5e/greenlet-3.5.1-cp314-cp314t-manylinux_2_24_s390x.manylinux_2_28_s390x.whl", hash = "sha256:ea37d5a157eb9493820d3792ac4ece28619a394391d2b9f2f78057d396ff0f0f", size = 656607, upload-time = "2026-05-20T14:09:13.949Z" }, - { url = "https://files.pythonhosted.org/packages/e1/f0/d17510297c35a2992712f0bf84de3779749999f7d3d63aa1f09db7c62dbe/greenlet-3.5.1-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:de2daaaebd1a5aa88c49045b6baf9310b3263796bd88db713edf37cf53e7bb4e", size = 654397, upload-time = "2026-05-20T13:14:30.696Z" }, - { url = "https://files.pythonhosted.org/packages/2c/c1/6da0a9ddcc29d7e51ef14883fa3dc1e53b3f4ffba00582106c7bf55da1d8/greenlet-3.5.1-cp314-cp314t-manylinux_2_39_riscv64.whl", hash = "sha256:8d8a23250ea3ec7b36de8fa4b541e9e2db3ee82915cc060ab0631609ad8b28de", size = 488287, upload-time = "2026-05-20T14:01:43.143Z" }, - { url = "https://files.pythonhosted.org/packages/37/eb/147387705bb89092645b012586e7273cb5ed3c90ef7eaf3a69173eaf0209/greenlet-3.5.1-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:3bfbd69cc349e43bf3a8ae1c85548ff0718efc887615c2db16c3833d7b0b072d", size = 1614469, upload-time = "2026-05-20T14:02:30.192Z" }, - { url = "https://files.pythonhosted.org/packages/a6/4e/37ee0da7732b7aa9896f17e15579a9df34b9fcb9dd494f0adfa749af6623/greenlet-3.5.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:4378720dd888136c27215a0214d32a4d37c3852765d45bc37aad0623423cfd78", size = 1675115, upload-time = "2026-05-20T13:14:40.972Z" }, - { url = "https://files.pythonhosted.org/packages/57/f3/97dfcf4a6eb5077f8a672234216fb5923eb89f2cab7081cb10b2cf75b605/greenlet-3.5.1-cp314-cp314t-win_amd64.whl", hash = "sha256:45718441607f9325d948db98cbc691276059316d0358c188c246da4e1d4d23d2", size = 245246, upload-time = "2026-05-20T13:12:22.646Z" }, - { url = "https://files.pythonhosted.org/packages/5d/73/d7f72e34b582f694f4a9b248162db7b09cc458a259ba8f0c0bfa1a34ea7d/greenlet-3.5.1-cp315-cp315-macosx_11_0_universal2.whl", hash = "sha256:2baee5ca02031757ffe8cc3d69f0cc0aec7065ce362622da74f32d3bcab1c541", size = 285575, upload-time = "2026-05-20T13:12:07.043Z" }, - { url = "https://files.pythonhosted.org/packages/df/59/fa9c6e87dc8ad27a95dabe2f29f372b733d05a8a67470f6c901ed9975655/greenlet-3.5.1-cp315-cp315-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9b1ec3274918a81d3ea778b9e75b56b72b33f300edb6cf7f3a7fe1dae56683de", size = 656428, upload-time = "2026-05-20T14:00:12.556Z" }, - { url = "https://files.pythonhosted.org/packages/f6/f9/e753408871eaa61dfe35e619cfc67512b036fde99893685d50eea9e07146/greenlet-3.5.1-cp315-cp315-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:111e2390ffffc47d5840b01711dd7fac07d4c09283d0283e7f3264b14e284c64", size = 667064, upload-time = "2026-05-20T14:05:48.662Z" }, - { url = "https://files.pythonhosted.org/packages/dc/74/807a047255bf1e09303627c46dc043dca596b6958a354d904f32ab382005/greenlet-3.5.1-cp315-cp315-manylinux_2_24_s390x.manylinux_2_28_s390x.whl", hash = "sha256:10a9a1c0bfbc93d41156ffcb90c75fbc05544054faf15dcc1fdf9765f8b607f0", size = 672962, upload-time = "2026-05-20T14:09:15.532Z" }, - { url = "https://files.pythonhosted.org/packages/96/27/5565b5b40389f1c7753003a07e21892fda8660926787036d5bc0308b8113/greenlet-3.5.1-cp315-cp315-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:e630136e905fe5ff43e86945ae41220b6d1470956a39220e708110ac48d01ea5", size = 665697, upload-time = "2026-05-20T13:14:32.943Z" }, - { url = "https://files.pythonhosted.org/packages/76/32/19d4e13225193c29b13e308015223f7d75fd3d8623d49dd19040d2ce8ec1/greenlet-3.5.1-cp315-cp315-manylinux_2_39_riscv64.whl", hash = "sha256:ef08c1567c78074b22d1a200183d52d04a14df447bf70bcbb6a3507a48e776fc", size = 476047, upload-time = "2026-05-20T14:01:44.39Z" }, - { url = "https://files.pythonhosted.org/packages/cf/82/e7de4178c0c2d1c9a5a3be3cc0b33e46a85b3ee4a77c071bf7ad8600e079/greenlet-3.5.1-cp315-cp315-musllinux_1_2_aarch64.whl", hash = "sha256:975eac34b44a7077ca4d421348455b94f0f518246a7f14bc6d2fdcfe5b584368", size = 1621256, upload-time = "2026-05-20T14:02:31.91Z" }, - { url = "https://files.pythonhosted.org/packages/00/10/f2dddcf7dacac17dfc68691809589adad06135eb28930429cf58a6467a2f/greenlet-3.5.1-cp315-cp315-musllinux_1_2_x86_64.whl", hash = "sha256:9ab3c3a0b2ae6198e67c898dad5215a49f9ae0d0081b3c3ec59f333e39eeca26", size = 1685956, upload-time = "2026-05-20T13:14:42.55Z" }, - { url = "https://files.pythonhosted.org/packages/22/17/4a232b32133230ada52f70e9d7f5b65b0caef8772f01849bd8d149e7e4ca/greenlet-3.5.1-cp315-cp315-win_amd64.whl", hash = "sha256:cbfc69be86e10dcfef5b1e6269d1d6926552aa89ee39e1de3353360c1b6989ab", size = 239802, upload-time = "2026-05-20T13:13:15.481Z" }, - { url = "https://files.pythonhosted.org/packages/c2/ae/4e623a7e6d4d2a5f4cb8e4c82de4169fc637942caae68d6e676b8a128ac5/greenlet-3.5.1-cp315-cp315-win_arm64.whl", hash = "sha256:92fd6d44ac5e5a887c8a5dc4a8ba0ba908527c31c12f78c6bc7dcfe8aab279f6", size = 236853, upload-time = "2026-05-20T13:15:37.301Z" }, - { url = "https://files.pythonhosted.org/packages/7a/57/816d9cff29119da3505b3d6a5e14a8af89006ac36f47f891ff293ee05af1/greenlet-3.5.1-cp315-cp315t-macosx_11_0_universal2.whl", hash = "sha256:a6fdf2433a5441ef9a95464f7c3e674775da1c8c1177fff311cee1acad4626ed", size = 293877, upload-time = "2026-05-20T13:10:19.078Z" }, - { url = "https://files.pythonhosted.org/packages/23/a1/59b0a7c7d140ff1a75626680b9a9899b79a9176cab298b394968fb023295/greenlet-3.5.1-cp315-cp315t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:7546556f0d649f99f6a361098a55f761181bb2ea12ff150bb16d26092ad88244", size = 655333, upload-time = "2026-05-20T14:00:14.758Z" }, - { url = "https://files.pythonhosted.org/packages/72/1b/5efe127597625042218939d01855109f352779050768b670b52edcc16a6c/greenlet-3.5.1-cp315-cp315t-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:d5ee3ea898009fa898f85f9982255d35278c477bebe185beca249cab42d4526c", size = 659443, upload-time = "2026-05-20T14:05:50.159Z" }, - { url = "https://files.pythonhosted.org/packages/c9/9d/1dcdf7b95ab3cf8c7b6d7277c18a5e167312f2b362ddfcc5d5e6d8d84b43/greenlet-3.5.1-cp315-cp315t-manylinux_2_24_s390x.manylinux_2_28_s390x.whl", hash = "sha256:a57b0d05a0448eed231d59c0ceb287dde984551e54cbc51ac2d4865712838e9c", size = 659998, upload-time = "2026-05-20T14:09:16.912Z" }, - { url = "https://files.pythonhosted.org/packages/6c/6d/c404246ea4d22d097a7426d0efb5b781bd7eb67715f09e79001bd552ab18/greenlet-3.5.1-cp315-cp315t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a5c81f74d204d3edd136ebfd50dce53acbb776995d721a0fe801626cfc93b8cd", size = 658356, upload-time = "2026-05-20T13:14:35.091Z" }, - { url = "https://files.pythonhosted.org/packages/05/7e/c4959664fc231d587d66d8e81f2095e98056ba1954beafdcbe635e251052/greenlet-3.5.1-cp315-cp315t-manylinux_2_39_riscv64.whl", hash = "sha256:b0703c2cef53e01baec47f7a3868009913ad71ec678bbecb42a6f40895e4ce62", size = 494470, upload-time = "2026-05-20T14:01:45.611Z" }, - { url = "https://files.pythonhosted.org/packages/51/02/f8ee37fb6d2219329f350af241c27fcf12df57e723d11f6fc6d3bacdadaa/greenlet-3.5.1-cp315-cp315t-musllinux_1_2_aarch64.whl", hash = "sha256:2c18ef16bf6d4dd410e4dd52996888ea1497be26892fe5bbc73580aba4287b8e", size = 1619216, upload-time = "2026-05-20T14:02:33.403Z" }, - { url = "https://files.pythonhosted.org/packages/93/c5/3dc9475ace2c7a3680da12372cddd7f1ac874eb410a1ac48d3e9dab83782/greenlet-3.5.1-cp315-cp315t-musllinux_1_2_x86_64.whl", hash = "sha256:17d86354f0ae6b61bf9be5148d0dd34e06c3cb7c602c671f79f29ac3b150e659", size = 1678427, upload-time = "2026-05-20T13:14:43.71Z" }, - { url = "https://files.pythonhosted.org/packages/df/4e/750c15c317a41ffb36f0bf40b933e3d744a7dede61889f74443ea69690cf/greenlet-3.5.1-cp315-cp315t-win_amd64.whl", hash = "sha256:e7516cf6ae6b8a582c2770a0caed47b8a48373ed732c33d69a72913ae6ac923e", size = 245225, upload-time = "2026-05-20T13:13:59.366Z" }, - { url = "https://files.pythonhosted.org/packages/4f/fd/d3baea2eeb7b617efd47e87ca06e2ec2c6118d303aa9e918e0ce16eadc10/greenlet-3.5.1-cp315-cp315t-win_arm64.whl", hash = "sha256:5028648bf2253ec4745add746129d3904121fa7fe871a76bed23c5720573ce0a", size = 239590, upload-time = "2026-05-20T13:13:37.382Z" }, -] - -[[package]] -name = "h11" -version = "0.16.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/01/ee/02a2c011bdab74c6fb3c75474d40b3052059d95df7e73351460c8588d963/h11-0.16.0.tar.gz", hash = "sha256:4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1", size = 101250, upload-time = "2025-04-24T03:35:25.427Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/04/4b/29cac41a4d98d144bf5f6d33995617b185d14b22401f75ca86f384e87ff1/h11-0.16.0-py3-none-any.whl", hash = "sha256:63cf8bbe7522de3bf65932fda1d9c2772064ffb3dae62d55932da54b31cb6c86", size = 37515, upload-time = "2025-04-24T03:35:24.344Z" }, -] - -[[package]] -name = "httpcore" -version = "1.0.9" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "certifi" }, - { name = "h11" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/06/94/82699a10bca87a5556c9c59b5963f2d039dbd239f25bc2a63907a05a14cb/httpcore-1.0.9.tar.gz", hash = "sha256:6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8", size = 85484, upload-time = "2025-04-24T22:06:22.219Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/7e/f5/f66802a942d491edb555dd61e3a9961140fd64c90bce1eafd741609d334d/httpcore-1.0.9-py3-none-any.whl", hash = "sha256:2d400746a40668fc9dec9810239072b40b4484b640a8c38fd654a024c7a1bf55", size = 78784, upload-time = "2025-04-24T22:06:20.566Z" }, -] - -[[package]] -name = "httpx" -version = "0.28.1" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "anyio" }, - { name = "certifi" }, - { name = "httpcore" }, - { name = "idna" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/b1/df/48c586a5fe32a0f01324ee087459e112ebb7224f646c0b5023f5e79e9956/httpx-0.28.1.tar.gz", hash = "sha256:75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc", size = 141406, upload-time = "2024-12-06T15:37:23.222Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/2a/39/e50c7c3a983047577ee07d2a9e53faf5a69493943ec3f6a384bdc792deb2/httpx-0.28.1-py3-none-any.whl", hash = "sha256:d909fcccc110f8c7faf814ca82a9a4d816bc5a6dbfea25d6591d6985b8ba59ad", size = 73517, upload-time = "2024-12-06T15:37:21.509Z" }, -] - -[[package]] -name = "idna" -version = "3.18" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/cd/63/9496c57188a2ee585e0f1db071d75089a11e98aa86eb99d9d7618fc1edce/idna-3.18.tar.gz", hash = "sha256:ffb385a7e039654cef1ab9ef32c6fafe283c0c0467bba1d9029738ce4a14a848", size = 196711, upload-time = "2026-06-02T14:34:07.794Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/1e/5e/d4e9f1a599fb8e573b7b87160658329fbf28d19eac2718f51fc3def3aa5a/idna-3.18-py3-none-any.whl", hash = "sha256:7f952cbe720b688055e3f87de14f5c3e5fdaa8bc3928985c4077ca689de849a2", size = 65455, upload-time = "2026-06-02T14:34:06.319Z" }, -] - -[[package]] -name = "learning-hub" -version = "0.1.0" -source = { virtual = "." } -dependencies = [ - { name = "fastapi" }, - { name = "pydantic-settings" }, - { name = "sqlalchemy" }, - { name = "sqlalchemy-libsql" }, - { name = "uvicorn" }, -] - -[package.dev-dependencies] -dev = [ - { name = "httpx" }, - { name = "pyright" }, -] - -[package.metadata] -requires-dist = [ - { name = "fastapi", specifier = ">=0.100.0" }, - { name = "pydantic-settings", specifier = ">=2.0.0" }, - { name = "sqlalchemy", specifier = ">=2.0.0" }, - { name = "sqlalchemy-libsql", specifier = ">=0.2.0" }, - { name = "uvicorn", specifier = ">=0.23.0" }, -] - -[package.metadata.requires-dev] -dev = [ - { name = "httpx", specifier = ">=0.24.0" }, - { name = "pyright", specifier = ">=1.1.0" }, -] - -[[package]] -name = "libsql-experimental" -version = "0.0.55" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/53/14/d3eb81673e2096f38eb48f08e38b447f6f2fdc37a50bdb1810d4a225a7aa/libsql_experimental-0.0.55.tar.gz", hash = "sha256:34df13ad6da446e4ccede9b3803af40684da399c8f304848b54ea37e7111b249", size = 31954, upload-time = "2025-06-09T07:26:48.682Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/86/5d/27315a4287356d9d859e7702dda54146a560581f973f3efb6c65515ca7ad/libsql_experimental-0.0.55-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:213a0fb80117e5946f16cfc5e4d99fc961829bdb6ded3121ba94516a327d7b79", size = 4874679, upload-time = "2025-06-09T07:26:26.989Z" }, - { url = "https://files.pythonhosted.org/packages/e9/ed/72132173b149933d539f00cd308d036d9de526db2dcb844912b9e7869101/libsql_experimental-0.0.55-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:c858f49a3270127f4f9e7b5835dde3e89c5df8eed375c9f17afd13d9d5723ed5", size = 4653222, upload-time = "2025-06-09T07:26:29.34Z" }, - { url = "https://files.pythonhosted.org/packages/8f/e6/186db46aedf96edab9392c9a72e4e5e965616620e9c82efe0832c5a081bd/libsql_experimental-0.0.55-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dacab03d6579c228e502833c30597af6a6d6b399d50debb482fc87e3b199e513", size = 5270078, upload-time = "2025-06-09T07:26:30.778Z" }, - { url = "https://files.pythonhosted.org/packages/25/28/72e3bea3d9f28fbabcf11648d791f1f20fe42c288f58afdfbd978bd5500e/libsql_experimental-0.0.55-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:cffb9cd0c4bb39b37a5060ad492516c921ecbcc17ca7baa62c791d6753aa155b", size = 4881247, upload-time = "2025-06-09T07:26:32.335Z" }, - { url = "https://files.pythonhosted.org/packages/17/ed/479f0908ccfdf1ccace798aac65480cb9514737fb37757daae0036ae6c7d/libsql_experimental-0.0.55-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:50312e354e739676885a9ea4000365538f3cec914d6b508a2206c3d33bea93a3", size = 4656349, upload-time = "2025-06-09T07:26:34.217Z" }, - { url = "https://files.pythonhosted.org/packages/69/32/d84a47c7ab5332247be52065aaa6b22e4baae969b33af8daa99fb1a317bf/libsql_experimental-0.0.55-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:60d018dbad48f98ddee49d211618ab6309d4fa2a51beb8d9076de184d1cae9da", size = 5273739, upload-time = "2025-06-09T07:26:35.913Z" }, - { url = "https://files.pythonhosted.org/packages/a0/9f/3589b9590ba948922bd200a02d754fa29e739da81a2953367e9283667a16/libsql_experimental-0.0.55-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:f3bfd7af2ca9d1ff8f8c7f7fce5f1a650bfe53c23b45658253480fe287283bae", size = 4881245, upload-time = "2025-06-09T07:26:37.382Z" }, - { url = "https://files.pythonhosted.org/packages/37/cf/4aead944cb90f82ab1b61edc78dbe893420e8c4ceee19e1fdae775b1273d/libsql_experimental-0.0.55-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:b3476a78edb8f59aa6c571d6def1840fff8d263eb4bbc4b26b2afd7400cb9ba2", size = 4656348, upload-time = "2025-06-09T07:26:39.04Z" }, - { url = "https://files.pythonhosted.org/packages/70/73/134dc2db0c3805f62953c85778bf93ac2f4a5ad81d49e592be990b012711/libsql_experimental-0.0.55-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7a5dd325f87425546e0a7f0d460d4b6e1852bc4d4194a7b5ad127614ef8b3b10", size = 5273740, upload-time = "2025-06-09T07:26:40.597Z" }, - { url = "https://files.pythonhosted.org/packages/a3/72/d958df309c1cf3baa816eb323dd49dbb0cb91b1cf0e29beea13aa1ade637/libsql_experimental-0.0.55-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f12fdddea8987572e44eda7eef8f2ed7377c42ea43386bccaae43d001116bbc1", size = 5268646, upload-time = "2025-06-09T07:26:47.407Z" }, -] - -[[package]] -name = "nodeenv" -version = "1.10.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/24/bf/d1bda4f6168e0b2e9e5958945e01910052158313224ada5ce1fb2e1113b8/nodeenv-1.10.0.tar.gz", hash = "sha256:996c191ad80897d076bdfba80a41994c2b47c68e224c542b48feba42ba00f8bb", size = 55611, upload-time = "2025-12-20T14:08:54.006Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/88/b2/d0896bdcdc8d28a7fc5717c305f1a861c26e18c05047949fb371034d98bd/nodeenv-1.10.0-py2.py3-none-any.whl", hash = "sha256:5bb13e3eed2923615535339b3c620e76779af4cb4c6a90deccc9e36b274d3827", size = 23438, upload-time = "2025-12-20T14:08:52.782Z" }, -] - -[[package]] -name = "pydantic" -version = "2.13.4" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "annotated-types" }, - { name = "pydantic-core" }, - { name = "typing-extensions" }, - { name = "typing-inspection" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/18/a5/b60d21ac674192f8ab0ba4e9fd860690f9b4a6e51ca5df118733b487d8d6/pydantic-2.13.4.tar.gz", hash = "sha256:c40756b57adaa8b1efeeced5c196f3f3b7c435f90e84ea7f443901bec8099ef6", size = 844775, upload-time = "2026-05-06T13:43:05.343Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/fd/7b/122376b1fd3c62c1ed9dc80c931ace4844b3c55407b6fb2d199377c9736f/pydantic-2.13.4-py3-none-any.whl", hash = "sha256:45a282cde31d808236fd7ea9d919b128653c8b38b393d1c4ab335c62924d9aba", size = 472262, upload-time = "2026-05-06T13:43:02.641Z" }, -] - -[[package]] -name = "pydantic-core" -version = "2.46.4" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "typing-extensions" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/9d/56/921726b776ace8d8f5db44c4ef961006580d91dc52b803c489fafd1aa249/pydantic_core-2.46.4.tar.gz", hash = "sha256:62f875393d7f270851f20523dd2e29f082bcc82292d66db2b64ea71f64b6e1c1", size = 471464, upload-time = "2026-05-06T13:37:06.98Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/5c/fa/6d7708d2cfc1a832acb6aeb0cd16e801902df8a0f583bb3b4b527fde022e/pydantic_core-2.46.4-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:0e96592440881c74a213e5ad528e2b24d3d4f940de2766bed9010ab1d9e51594", size = 2111872, upload-time = "2026-05-06T13:40:27.596Z" }, - { url = "https://files.pythonhosted.org/packages/ae/6f/aa064a3e74b5745afbdf250594f38e7ead05e2d651bcb35994b9417a0d4d/pydantic_core-2.46.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:e0d65b8c354be7fb5f720c3caa8bc940bc2d20ce749c8e06135f07f8ed95dd7c", size = 1948255, upload-time = "2026-05-06T13:39:12.574Z" }, - { url = "https://files.pythonhosted.org/packages/43/3a/41114a9f7569b84b4d84e7a018c57c56347dac30c0d4a872946ec4e36c46/pydantic_core-2.46.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7bfb192b3f4b9e8a89b6277b6ce787564f62cfd272055f6e685726b111dc7826", size = 1972827, upload-time = "2026-05-06T13:38:19.841Z" }, - { url = "https://files.pythonhosted.org/packages/ef/25/1ab42e8048fe551934d9884e8d64daa7e990ad386f310a15981aeb6a5b08/pydantic_core-2.46.4-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:9037063db01f09b09e237c282b6792bd4da634b5402c4e7f0c61effed7701a04", size = 2041051, upload-time = "2026-05-06T13:38:10.447Z" }, - { url = "https://files.pythonhosted.org/packages/94/c2/1a934597ddf08da410385b3b7aae91956a5a76c635effef456074fad7e88/pydantic_core-2.46.4-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:fc010ab034c8c7452522748bf937df58020d256ccae0874463d1f4d01758af8e", size = 2221314, upload-time = "2026-05-06T13:40:13.089Z" }, - { url = "https://files.pythonhosted.org/packages/02/6d/9e8ad178c9c4df27ad3c8f25d1fe2a7ab0d2ba0559fad4aee5d3d1f16771/pydantic_core-2.46.4-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8c5dac79fa1614d1e06ca695109c6105923bd9c7d1d6c918d4e637b7e6b32fd3", size = 2285146, upload-time = "2026-05-06T13:38:59.224Z" }, - { url = "https://files.pythonhosted.org/packages/80/50/540cd3aeefc041beb111125c4bff779831a2111fc6b15a9138cda277d32c/pydantic_core-2.46.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f9fa868638bf362d3d138ea55829cefb3d5f4b0d7f142234382a15e2485dbec4", size = 2089685, upload-time = "2026-05-06T13:38:17.762Z" }, - { url = "https://files.pythonhosted.org/packages/6b/a4/b440ad35f05f6a38f89fa0f149accb3f0e02be94ca5e15f3c449a61b4bc9/pydantic_core-2.46.4-cp311-cp311-manylinux_2_31_riscv64.whl", hash = "sha256:17299feefe090f2caa5b8e37222bb5f663e4935a8bfa6931d4102e5df1a9f398", size = 2115420, upload-time = "2026-05-06T13:37:58.195Z" }, - { url = "https://files.pythonhosted.org/packages/99/61/de4f55db8dfd57bfdfa9a12ec90fe1b57c4f41062f7ca86f08586b3e0ac0/pydantic_core-2.46.4-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:4c63ebc82684aa89d9a3bcbd13d515b3be44250dc68dd3bd81526c1cb31286c3", size = 2165122, upload-time = "2026-05-06T13:37:01.167Z" }, - { url = "https://files.pythonhosted.org/packages/f7/52/7c529d7bdb2d1068bd52f51fe32572c8301f9a4febf1948f10639f1436f5/pydantic_core-2.46.4-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:aaa2a54443eff1950ba5ddc6b6ccda0d9c84a364276a62f969bdf2a390650848", size = 2182573, upload-time = "2026-05-06T13:38:45.04Z" }, - { url = "https://files.pythonhosted.org/packages/37/b3/7c40325848ba78247f2812dcf9c7274e38cd801820ca6dd9fe63bcfb0eb4/pydantic_core-2.46.4-cp311-cp311-musllinux_1_1_armv7l.whl", hash = "sha256:18e5ceec2ab67e6d5f1a9085e5a24c9c4e2ac4545730bfe668680bca05e555f3", size = 2317139, upload-time = "2026-05-06T13:37:15.539Z" }, - { url = "https://files.pythonhosted.org/packages/d9/37/f913f81a657c865b75da6c0dbed79876073c2a43b5bd9edbe8da785e4d49/pydantic_core-2.46.4-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:a0f62d0a58f4e7da165457e995725421e0064f2255d8eccebc49f41bbc23b109", size = 2360433, upload-time = "2026-05-06T13:37:30.099Z" }, - { url = "https://files.pythonhosted.org/packages/c4/67/6acaa1be2567f9256b056d8477158cac7240813956ce86e49deae8e173b4/pydantic_core-2.46.4-cp311-cp311-win32.whl", hash = "sha256:041bde0a48fd37cf71cab1c9d56d3e8625a3793fef1f7dd232b3ff37e978ecda", size = 1985513, upload-time = "2026-05-06T13:38:15.669Z" }, - { url = "https://files.pythonhosted.org/packages/aa/e6/c505f83dfeda9a2e5c995cfd872949e4d05e12f7feb3dca72f633daefa94/pydantic_core-2.46.4-cp311-cp311-win_amd64.whl", hash = "sha256:6f2eeda33a839975441c86a4119e1383c50b47faf0cbb5176985565c6bb02c33", size = 2071114, upload-time = "2026-05-06T13:40:35.416Z" }, - { url = "https://files.pythonhosted.org/packages/0f/da/7a263a96d965d9d0df5e8de8a475f33495451117035b09acb110288c381f/pydantic_core-2.46.4-cp311-cp311-win_arm64.whl", hash = "sha256:14f4c5d6db102bd796a627bbb3a17b4cf4574b9ae861d8b7c9a9661c6dd3362d", size = 2044298, upload-time = "2026-05-06T13:38:29.754Z" }, - { url = "https://files.pythonhosted.org/packages/ce/8c/af022f0af448d7747c5154288d46b5f2bc5f17366eaa0e23e9aa04d59f3b/pydantic_core-2.46.4-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:3245406455a5d98187ec35530fd772b1d799b26667980872c8d4614991e2c4a2", size = 2106158, upload-time = "2026-05-06T13:38:57.215Z" }, - { url = "https://files.pythonhosted.org/packages/19/95/6195171e385007300f0f5574592e467c568becce2d937a0b6804f218bc49/pydantic_core-2.46.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:962ccbab7b642487b1d8b7df90ef677e03134cf1fd8880bf698649b22a69371f", size = 1951724, upload-time = "2026-05-06T13:37:02.697Z" }, - { url = "https://files.pythonhosted.org/packages/8e/bc/f47d1ff9cbb1620e1b5b697eef06010035735f07820180e74178226b27b3/pydantic_core-2.46.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8233f2947cf85404441fd7e0085f53b10c93e0ee78611099b5c7237e36aacbf7", size = 1975742, upload-time = "2026-05-06T13:37:09.448Z" }, - { url = "https://files.pythonhosted.org/packages/5b/11/9b9a5b0306345664a2da6410877af6e8082481b5884b3ddd78d47c6013ce/pydantic_core-2.46.4-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:3a233125ac121aa3ffba9a2b59edfc4a985a76092dc8279586ab4b71390875e7", size = 2052418, upload-time = "2026-05-06T13:37:38.234Z" }, - { url = "https://files.pythonhosted.org/packages/f1/b7/a65fec226f5d78fc39f4a13c4cc0c768c22b113438f60c14adc9d2865038/pydantic_core-2.46.4-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5b712b53160b79a5850310b912a5ef8e57e56947c8ad690c227f5c9d7e561712", size = 2232274, upload-time = "2026-05-06T13:38:27.753Z" }, - { url = "https://files.pythonhosted.org/packages/68/f0/92039db98b907ef49269a8271f67db9cb78ae2fc68062ef7e4e77adb5f61/pydantic_core-2.46.4-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9401557acd873c3a7f3eb9383edef8ac4968f9510e340f4808d427e75667e7b4", size = 2309940, upload-time = "2026-05-06T13:38:05.353Z" }, - { url = "https://files.pythonhosted.org/packages/5f/97/2aab507d3d00ca626e8e57c1eac6a79e4e5fbcc63eb99733ff55d1717f65/pydantic_core-2.46.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:926c9541b14b12b1681dca8a0b75feb510b06c6341b70a8e500c2fdcff837cce", size = 2094516, upload-time = "2026-05-06T13:39:10.577Z" }, - { url = "https://files.pythonhosted.org/packages/22/37/a8aca44d40d737dde2bc05b3c6c07dff0de07ce6f82e9f3167aeaf4d5dea/pydantic_core-2.46.4-cp312-cp312-manylinux_2_31_riscv64.whl", hash = "sha256:56cb4851bcaf3d117eddcef4fe66afd750a50274b0da8e22be256d10e5611987", size = 2136854, upload-time = "2026-05-06T13:40:22.59Z" }, - { url = "https://files.pythonhosted.org/packages/24/99/fcef1b79238c06a8cbec70819ac722ba76e02bc8ada9b0fd66eba40da01b/pydantic_core-2.46.4-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:c68fcd102d71ea85c5b2dfac3f4f8476eff42a9e078fd5faefff6d145063536b", size = 2180306, upload-time = "2026-05-06T13:40:10.666Z" }, - { url = "https://files.pythonhosted.org/packages/ae/6c/fc44000918855b42779d007ae63b0532794739027b2f417321cddbc44f6a/pydantic_core-2.46.4-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:b2f69dec1725e79a012d920df1707de5caf7ed5e08f3be4435e25803efc47458", size = 2190044, upload-time = "2026-05-06T13:40:43.231Z" }, - { url = "https://files.pythonhosted.org/packages/6b/65/d9cadc9f1920d7a127ad2edba16c1db7916e59719285cd6c94600b0080ba/pydantic_core-2.46.4-cp312-cp312-musllinux_1_1_armv7l.whl", hash = "sha256:8d0820e8192167f80d88d64038e609c31452eeca865b4e1d9950a27a4609b00b", size = 2329133, upload-time = "2026-05-06T13:39:57.365Z" }, - { url = "https://files.pythonhosted.org/packages/d0/cf/c873d91679f3a30bcf5e7ac280ce5573483e72295307685120d0d5ad3416/pydantic_core-2.46.4-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:fbdb89b3e1c94a30cc5edfce477c6e6a5dc4d8f84665b455c27582f211a1c72c", size = 2374464, upload-time = "2026-05-06T13:38:06.976Z" }, - { url = "https://files.pythonhosted.org/packages/47/bd/6f2fc8188f31bf10590f1e98e7b306336161fac930a8c514cd7bd828c7dc/pydantic_core-2.46.4-cp312-cp312-win32.whl", hash = "sha256:9aa768456404a8bf48a4406685ac2bec8e72b62c69313734fa3b73cf33b3a894", size = 1974823, upload-time = "2026-05-06T13:40:47.985Z" }, - { url = "https://files.pythonhosted.org/packages/40/8c/985c1d41ea1107c2534abd9870e4ed5c8e7669b5c308297835c001e7a1c4/pydantic_core-2.46.4-cp312-cp312-win_amd64.whl", hash = "sha256:e9c26f834c65f5752f3f06cb08cb86a913ceb7274d0db6e267808a708b46bc89", size = 2072919, upload-time = "2026-05-06T13:39:21.153Z" }, - { url = "https://files.pythonhosted.org/packages/c4/ba/f463d006e0c47373ca7ec5e1a261c59dc01ef4d62b2657af925fb0deee3a/pydantic_core-2.46.4-cp312-cp312-win_arm64.whl", hash = "sha256:4fc73cb559bdb54b1134a706a2802a4cddd27a0633f5abb7e53056268751ac6a", size = 2027604, upload-time = "2026-05-06T13:39:03.753Z" }, - { url = "https://files.pythonhosted.org/packages/51/a2/5d30b469c5267a17b39dec53208222f76a8d351dfac4af661888c5aee77d/pydantic_core-2.46.4-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:5d5902252db0d3cedf8d4a1bc68f70eeb430f7e4c7104c8c476753519b423008", size = 2106306, upload-time = "2026-05-06T13:37:48.029Z" }, - { url = "https://files.pythonhosted.org/packages/c1/81/4fa520eaffa8bd7d1525e644cd6d39e7d60b1592bc5b516693c7340b50f1/pydantic_core-2.46.4-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:c94f0688e7b8d0a67abf40e57a7eaaecd17cc9586706a31b76c031f63df052b4", size = 1951906, upload-time = "2026-05-06T13:37:17.012Z" }, - { url = "https://files.pythonhosted.org/packages/03/d5/fd02da45b659668b05923b17ba3a0100a0a3d5541e3bd8fcc4ecb711309e/pydantic_core-2.46.4-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f027324c56cd5406ca49c124b0db10e56c69064fec039acc571c29020cc87c76", size = 1976802, upload-time = "2026-05-06T13:37:35.113Z" }, - { url = "https://files.pythonhosted.org/packages/21/f2/95727e1368be3d3ed485eaab7adbd7dda408f33f7a36e8b48e0144002b91/pydantic_core-2.46.4-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e739fee756ba1010f8bcccb534252e85a35fe45ae92c295a06059ce58b74ccd3", size = 2052446, upload-time = "2026-05-06T13:37:12.313Z" }, - { url = "https://files.pythonhosted.org/packages/9c/86/5d99feea3f77c7234b8718075b23db11532773c1a0dbd9b9490215dc2eeb/pydantic_core-2.46.4-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9d56801be94b86a9da183e5f3766e6310752b99ff647e38b09a9500d88e46e76", size = 2232757, upload-time = "2026-05-06T13:39:01.149Z" }, - { url = "https://files.pythonhosted.org/packages/d2/3a/508ac615935ef7588cf6d9e9b91309fdc2da751af865e02a9098de88258c/pydantic_core-2.46.4-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2412e734dcb48da14d4e4006b82b46b74f2518b8a26ee7e58c6844a6cd6d03c4", size = 2309275, upload-time = "2026-05-06T13:37:41.406Z" }, - { url = "https://files.pythonhosted.org/packages/07/f8/41db9de19d7987d6b04715a02b3b40aea467000275d9d758ffaa31af7d50/pydantic_core-2.46.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9551187363ffc0de2a00b2e47c25aeaeb1020b69b668762966df15fc5659dd5a", size = 2094467, upload-time = "2026-05-06T13:39:18.847Z" }, - { url = "https://files.pythonhosted.org/packages/2c/e2/f35033184cb11d0052daf4416e8e10a502ea2ac006fc4f459aee872727d1/pydantic_core-2.46.4-cp313-cp313-manylinux_2_31_riscv64.whl", hash = "sha256:0186750b482eefa11d7f435892b09c5c606193ef3375bcf94aa00ae6bfb66262", size = 2134417, upload-time = "2026-05-06T13:40:17.944Z" }, - { url = "https://files.pythonhosted.org/packages/7e/7b/6ceeb1cc90e193862f444ebe373d8fdf613f0a82572dde03fb10734c6c71/pydantic_core-2.46.4-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:5855698a4856556d86e8e6cd8434bc3ac0314ee8e12089ae0e143f64c6256e4e", size = 2179782, upload-time = "2026-05-06T13:40:32.618Z" }, - { url = "https://files.pythonhosted.org/packages/5a/f2/c8d7773ede6af08036423a00ae0ceffce266c3c52a096c435d68c896083f/pydantic_core-2.46.4-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:cbaf13819775b7f769bf4a1f066cb6df7a28d4480081a589828ef190226881cd", size = 2188782, upload-time = "2026-05-06T13:36:51.018Z" }, - { url = "https://files.pythonhosted.org/packages/59/31/0c864784e31f09f05cdd87606f08923b9c9e7f6e51dd27f20f62f975ce9f/pydantic_core-2.46.4-cp313-cp313-musllinux_1_1_armv7l.whl", hash = "sha256:633147d34cf4550417f12e2b1a0383973bdf5cdfde212cb09e9a581cf10820be", size = 2328334, upload-time = "2026-05-06T13:40:37.764Z" }, - { url = "https://files.pythonhosted.org/packages/c2/eb/4f6c8a41efa30baa755590f4141abf3a8c370fab610915733e74134a7270/pydantic_core-2.46.4-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:82cf5301172168103724d49a1444d3378cb20cdee30b116a1bd6031236298a5d", size = 2372986, upload-time = "2026-05-06T13:39:34.152Z" }, - { url = "https://files.pythonhosted.org/packages/5b/24/b375a480d53113860c299764bfe9f349a3dc9108b3adc0d7f0d786492ebf/pydantic_core-2.46.4-cp313-cp313-win32.whl", hash = "sha256:9fa8ae11da9e2b3126c6426f147e0fba88d96d65921799bb30c6abd1cb2c97fb", size = 1973693, upload-time = "2026-05-06T13:37:55.072Z" }, - { url = "https://files.pythonhosted.org/packages/7e/e8/cff247591966f2d22ec8c003cd7587e27b7ba7b81ab2fb888e3ab75dc285/pydantic_core-2.46.4-cp313-cp313-win_amd64.whl", hash = "sha256:6b3ace8194b0e5204818c92802dcdca7fc6d88aabbb799d7c795540d9cd6d292", size = 2071819, upload-time = "2026-05-06T13:38:49.139Z" }, - { url = "https://files.pythonhosted.org/packages/c6/1a/f4aee670d5670e9e148e0c82c7db98d780be566c6e6a97ee8035528ca0b3/pydantic_core-2.46.4-cp313-cp313-win_arm64.whl", hash = "sha256:184c081504d17f1c1066e430e117142b2c77d9448a97f7b65c6ac9fd9aee238d", size = 2027411, upload-time = "2026-05-06T13:40:45.796Z" }, - { url = "https://files.pythonhosted.org/packages/8d/74/228a26ddad29c6672b805d9fd78e8d251cd04004fa7eed0e622096cd0250/pydantic_core-2.46.4-cp314-cp314-macosx_10_12_x86_64.whl", hash = "sha256:428e04521a40150c85216fc8b85e8d39fece235a9cf5e383761238c7fa9b96fb", size = 2102079, upload-time = "2026-05-06T13:38:41.019Z" }, - { url = "https://files.pythonhosted.org/packages/ad/1f/8970b150a4b4365623ae00fc88603491f763c627311ae8031e3111356d6e/pydantic_core-2.46.4-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:23ace664830ee0bfe014a0c7bc248b1f7f25ed7ad103852c317624a1083af462", size = 1952179, upload-time = "2026-05-06T13:36:59.812Z" }, - { url = "https://files.pythonhosted.org/packages/95/30/5211a831ae054928054b2f79731661087a2bc5c01e825c672b3a4a8f1b3e/pydantic_core-2.46.4-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ce5c1d2a8b27468f433ca974829c44060b8097eedc39933e3c206a90ee49c4a9", size = 1978926, upload-time = "2026-05-06T13:37:39.933Z" }, - { url = "https://files.pythonhosted.org/packages/57/e9/689668733b1eb67adeef047db3c2e8788fcf65a7fd9c9e2b46b7744fe245/pydantic_core-2.46.4-cp314-cp314-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:7283d57845ecf5a163403eb0702dfc220cc4fbdd18919cb5ccea4f95ee1cdab4", size = 2046785, upload-time = "2026-05-06T13:38:01.995Z" }, - { url = "https://files.pythonhosted.org/packages/60/d9/6715260422ff50a2109878fd24d948a6c3446bb2664f34ee78cd972b3acd/pydantic_core-2.46.4-cp314-cp314-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8daafc69c93ee8a0204506a3b6b30f586ef54028f52aeeeb5c4cfc5184fd5914", size = 2228733, upload-time = "2026-05-06T13:40:50.371Z" }, - { url = "https://files.pythonhosted.org/packages/18/ae/fdb2f64316afca925640f8e70bb1a564b0ec2721c1389e25b8eb4bf9a299/pydantic_core-2.46.4-cp314-cp314-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cd2213145bcc2ba85884d0ac63d222fece9209678f77b9b4d76f054c561adb28", size = 2307534, upload-time = "2026-05-06T13:37:21.531Z" }, - { url = "https://files.pythonhosted.org/packages/89/1d/8eff589b45bb8190a9d12c49cfad0f176a5cbd1534908a6b5125e2886239/pydantic_core-2.46.4-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7a5f930472650a82629163023e630d160863fce524c616f4e5186e5de9d9a49b", size = 2099732, upload-time = "2026-05-06T13:39:31.942Z" }, - { url = "https://files.pythonhosted.org/packages/06/d5/ee5a3366637fee41dee51a1fc91562dcf12ddbc68fda34e6b253da2324bb/pydantic_core-2.46.4-cp314-cp314-manylinux_2_31_riscv64.whl", hash = "sha256:c1b3f518abeca3aa13c712fd202306e145abf59a18b094a6bafb2d2bbf59192c", size = 2129627, upload-time = "2026-05-06T13:37:25.033Z" }, - { url = "https://files.pythonhosted.org/packages/94/33/2414be571d2c6a6c4d08be21f9292b6d3fdb08949a97b6dfe985017821db/pydantic_core-2.46.4-cp314-cp314-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:1a7dd0b3ee80d90150e3495a3a13ac34dbcbfd4f012996a6a1d8900e91b5c0fb", size = 2179141, upload-time = "2026-05-06T13:37:14.046Z" }, - { url = "https://files.pythonhosted.org/packages/7b/79/7daa95be995be0eecc4cf75064cb33f9bbbfe3fe0158caf2f0d4a996a5c7/pydantic_core-2.46.4-cp314-cp314-musllinux_1_1_aarch64.whl", hash = "sha256:3fb702cd90b0446a3a1c5e470bfa0dd23c0233b676a9099ddcc964fa6ca13898", size = 2184325, upload-time = "2026-05-06T13:36:53.615Z" }, - { url = "https://files.pythonhosted.org/packages/9f/cb/d0a382f5c0de8a222dc61c65348e0ce831b1f68e0a018450d31c2cace3a5/pydantic_core-2.46.4-cp314-cp314-musllinux_1_1_armv7l.whl", hash = "sha256:b8458003118a712e66286df6a707db01c52c0f52f7db8e4a38f0da1d3b94fc4e", size = 2323990, upload-time = "2026-05-06T13:40:29.971Z" }, - { url = "https://files.pythonhosted.org/packages/05/db/d9ba624cc4a5aced1598e88c04fdbd8310c8a69b9d38b9a3d39ce3a61ed7/pydantic_core-2.46.4-cp314-cp314-musllinux_1_1_x86_64.whl", hash = "sha256:372429a130e469c9cd698925ce5fc50940b7a1336b0d82038e63d5bbc4edc519", size = 2369978, upload-time = "2026-05-06T13:37:23.027Z" }, - { url = "https://files.pythonhosted.org/packages/f2/20/d15df15ba918c423461905802bfd2981c3af0bfa0e40d05e13edbfa48bc3/pydantic_core-2.46.4-cp314-cp314-win32.whl", hash = "sha256:85bb3611ff1802f3ee7fdd7dbff26b56f343fb432d57a4728fdd49b6ef35e2f4", size = 1966354, upload-time = "2026-05-06T13:38:03.499Z" }, - { url = "https://files.pythonhosted.org/packages/fc/b6/6b8de4c0a7d7ab3004c439c80c5c1e0a3e8d78bbae19379b01960383d9e5/pydantic_core-2.46.4-cp314-cp314-win_amd64.whl", hash = "sha256:811ff8e9c313ab425368bcbb36e5c4ebd7108c2bbf4e4089cfbb0b01eff63fac", size = 2072238, upload-time = "2026-05-06T13:39:40.807Z" }, - { url = "https://files.pythonhosted.org/packages/32/36/51eb763beec1f4cf59b1db243a7dcc39cbb41230f050a09b9d69faaf0a48/pydantic_core-2.46.4-cp314-cp314-win_arm64.whl", hash = "sha256:bfec22eab3c8cc2ceec0248aec886624116dc079afa027ecc8ad4a7e62010f8a", size = 2018251, upload-time = "2026-05-06T13:37:26.72Z" }, - { url = "https://files.pythonhosted.org/packages/e8/91/855af51d625b23aa987116a19e231d2aaef9c4a415273ddc189b79a45fee/pydantic_core-2.46.4-cp314-cp314t-macosx_10_12_x86_64.whl", hash = "sha256:af8244b2bef6aaad6d92cda81372de7f8c8d36c9f0c3ea36e827c60e7d9467a0", size = 2099593, upload-time = "2026-05-06T13:39:47.682Z" }, - { url = "https://files.pythonhosted.org/packages/fb/1b/8784a54c65edb5f49f0a14d6977cf1b209bba85a4c77445b255c2de58ab3/pydantic_core-2.46.4-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:5a4330cdbc57162e4b3aa303f588ba752257694c9c9be3e7ebb11b4aca659b5d", size = 1935226, upload-time = "2026-05-06T13:40:40.428Z" }, - { url = "https://files.pythonhosted.org/packages/e8/e7/1955d28d1afc56dd4b3ad7cc0cf39df1b9852964cf16e5d13912756d6d6b/pydantic_core-2.46.4-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:29c61fc04a3d840155ff08e475a04809278972fe6aef51e2720554e96367e34b", size = 1974605, upload-time = "2026-05-06T13:37:32.029Z" }, - { url = "https://files.pythonhosted.org/packages/93/e2/3fedbf0ba7a22850e6e9fd78117f1c0f10f950182344d8a6c535d468fdd8/pydantic_core-2.46.4-cp314-cp314t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:c50f2528cf200c5eed56faf3f4e22fcd5f38c157a8b78576e6ba3168ec35f000", size = 2030777, upload-time = "2026-05-06T13:38:55.239Z" }, - { url = "https://files.pythonhosted.org/packages/f8/61/46be275fcaaba0b4f5b9669dd852267ce1ff616592dccf7a7845588df091/pydantic_core-2.46.4-cp314-cp314t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:0cbe8b01f948de4286c74cdd6c667aceb38f5c1e26f0693b3983d9d74887c65e", size = 2236641, upload-time = "2026-05-06T13:37:08.096Z" }, - { url = "https://files.pythonhosted.org/packages/60/db/12e93e46a8bac9988be3c016860f83293daea8c716c029c9ace279036f2f/pydantic_core-2.46.4-cp314-cp314t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:617d7e2ca7dcb8c5cf6bcb8c59b8832c94b36196bbf1cbd1bfb56ed341905edd", size = 2286404, upload-time = "2026-05-06T13:40:20.221Z" }, - { url = "https://files.pythonhosted.org/packages/e2/4a/4d8b19008f38d31c53b8219cfedc2e3d5de5fe99d90076b7e767de29274f/pydantic_core-2.46.4-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7027560ee92211647d0d34e3f7cd6f50da56399d26a9c8ad0da286d3869a53f3", size = 2109219, upload-time = "2026-05-06T13:38:12.153Z" }, - { url = "https://files.pythonhosted.org/packages/88/70/3cbc40978fefb7bb09c6708d40d4ad1a5d70fd7213c3d17f971de868ec1f/pydantic_core-2.46.4-cp314-cp314t-manylinux_2_31_riscv64.whl", hash = "sha256:f99626688942fb746e545232e7726926f3be91b5975f8b55327665fafda991c7", size = 2110594, upload-time = "2026-05-06T13:40:02.971Z" }, - { url = "https://files.pythonhosted.org/packages/9d/20/b8d36736216e29491125531685b2f9e61aa5b4b2599893f8268551da3338/pydantic_core-2.46.4-cp314-cp314t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:fc3e9034a63de20e15e8ade85358bc6efc614008cab72898b4b4952bea0509ff", size = 2159542, upload-time = "2026-05-06T13:39:27.506Z" }, - { url = "https://files.pythonhosted.org/packages/1d/a2/367df868eb584dacf6bf82a389272406d7178e301c4ac82545ab98bc2dd9/pydantic_core-2.46.4-cp314-cp314t-musllinux_1_1_aarch64.whl", hash = "sha256:97e7cf2be5c77b7d1a9713a05605d49460d02c6078d38d8bef3cbe323c548424", size = 2168146, upload-time = "2026-05-06T13:38:31.93Z" }, - { url = "https://files.pythonhosted.org/packages/c1/b8/4460f77f7e201893f649a29ab355dddd3beee8a97bcb1a320db414f9a06e/pydantic_core-2.46.4-cp314-cp314t-musllinux_1_1_armv7l.whl", hash = "sha256:3bf92c5d0e00fefaab325a4d27828fe6b6e2a21848686b5b60d2d9eeb09d76c6", size = 2306309, upload-time = "2026-05-06T13:37:44.717Z" }, - { url = "https://files.pythonhosted.org/packages/64/c4/be2639293acd87dc8ddbcec41a73cee9b2ebf996fe6d892a1a74e88ad3f7/pydantic_core-2.46.4-cp314-cp314t-musllinux_1_1_x86_64.whl", hash = "sha256:3ecbc122d18468d06ca279dc26a8c2e2d5acb10943bb35e36ae92096dc3b5565", size = 2369736, upload-time = "2026-05-06T13:37:05.645Z" }, - { url = "https://files.pythonhosted.org/packages/30/a6/9f9f380dbb301f67023bf8f707aaa75daadf84f7152d95c410fd7e81d994/pydantic_core-2.46.4-cp314-cp314t-win32.whl", hash = "sha256:e846ae7835bf0703ae43f534ab79a867146dadd59dc9ca5c8b53d5c8f7c9ef02", size = 1955575, upload-time = "2026-05-06T13:38:51.116Z" }, - { url = "https://files.pythonhosted.org/packages/40/1f/f1eb9eb350e795d1af8586289746f5c5677d16043040d63710e22abc43c9/pydantic_core-2.46.4-cp314-cp314t-win_amd64.whl", hash = "sha256:2108ba5c1c1eca18030634489dc544844144ee36357f2f9f780b93e7ddbb44b5", size = 2051624, upload-time = "2026-05-06T13:38:21.672Z" }, - { url = "https://files.pythonhosted.org/packages/f6/d2/42dd53d0a85c27606f316d3aa5d2869c4e8470a5ed6dec30e4a1abe19192/pydantic_core-2.46.4-cp314-cp314t-win_arm64.whl", hash = "sha256:4fcbe087dbc2068af7eda3aa87634eba216dbda64d1ae73c8684b621d33f6596", size = 2017325, upload-time = "2026-05-06T13:40:52.723Z" }, - { url = "https://files.pythonhosted.org/packages/ee/a4/73995fd4ebbb46ba0ee51e6fa049b8f02c40daebb762208feda8a6b7894d/pydantic_core-2.46.4-graalpy311-graalpy242_311_native-macosx_10_12_x86_64.whl", hash = "sha256:14d4edf427bdcf950a8a02d7cb44a08614388dd6e1bdcbf4f67504fa7887da9c", size = 2111589, upload-time = "2026-05-06T13:37:10.817Z" }, - { url = "https://files.pythonhosted.org/packages/fb/7f/f37d3a5e8bfcc2e403f5c57a730f2d815693fb42119e8ea48b3789335af1/pydantic_core-2.46.4-graalpy311-graalpy242_311_native-macosx_11_0_arm64.whl", hash = "sha256:0ce40cd7b21210e99342afafbd4d0f76d784eb5b1d60f3bdc566be4983c6c73b", size = 1944552, upload-time = "2026-05-06T13:36:56.717Z" }, - { url = "https://files.pythonhosted.org/packages/15/3c/d7eb777b3ff43e8433a4efb39a17aa8fd98a4ee8561a24a67ef5db07b2d6/pydantic_core-2.46.4-graalpy311-graalpy242_311_native-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:90884113d8b48f760e9587002789ddd741e76ab9f89518cd1e43b1f1a52ec44b", size = 1982984, upload-time = "2026-05-06T13:39:06.207Z" }, - { url = "https://files.pythonhosted.org/packages/63/87/70b9f40170a81afd55ca26c9b2acb25c20d64bcfbf888fafecb3ba077d4c/pydantic_core-2.46.4-graalpy311-graalpy242_311_native-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:66ce7632c22d837c95301830e111ad0128a32b8207533b60896a96c4915192ea", size = 2138417, upload-time = "2026-05-06T13:39:45.476Z" }, - { url = "https://files.pythonhosted.org/packages/9d/1d/8987ad40f65ae1432753072f214fb5c74fe47ffbd0698bb9cbbb585664f8/pydantic_core-2.46.4-graalpy312-graalpy250_312_native-macosx_10_12_x86_64.whl", hash = "sha256:1d8ba486450b14f3b1d63bc521d410ec7565e52f887b9fb671791886436a42f7", size = 2095527, upload-time = "2026-05-06T13:39:52.283Z" }, - { url = "https://files.pythonhosted.org/packages/64/d3/84c282a7eee1d3ac4c0377546ef5a1ea436ce26840d9ac3b7ed54a377507/pydantic_core-2.46.4-graalpy312-graalpy250_312_native-macosx_11_0_arm64.whl", hash = "sha256:3009f12e4e90b7f88b4f9adb1b0c4a3d58fe7820f3238c190047209d148026df", size = 1936024, upload-time = "2026-05-06T13:40:15.671Z" }, - { url = "https://files.pythonhosted.org/packages/d7/ca/eac61596cdeb4d7e174d3dc0bd8a6238f14f75f97a24e7b7db4c7e7340a0/pydantic_core-2.46.4-graalpy312-graalpy250_312_native-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ad785e92e6dc634c21555edc8bd6b64957ab844541bcb96a1366c202951ae526", size = 1990696, upload-time = "2026-05-06T13:38:34.717Z" }, - { url = "https://files.pythonhosted.org/packages/fa/c3/7c8b240552251faf6b3a957db200fcfbbcec36763c050428b601e0c9b83b/pydantic_core-2.46.4-graalpy312-graalpy250_312_native-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:00c603d540afdd6b80eb39f078f33ebd46211f02f33e34a32d9f053bba711de0", size = 2147590, upload-time = "2026-05-06T13:39:29.883Z" }, - { url = "https://files.pythonhosted.org/packages/11/cb/428de0385b6c8d44b716feba566abfacfbd23ee3c4439faa789a1456242f/pydantic_core-2.46.4-pp311-pypy311_pp73-macosx_10_12_x86_64.whl", hash = "sha256:0c563b08bca408dc7f65f700633d8442fffb2421fc47b8101377e9fd65051ff0", size = 2112782, upload-time = "2026-05-06T13:37:04.016Z" }, - { url = "https://files.pythonhosted.org/packages/0b/b5/6a17bdadd0fc1f170adfd05a20d37c832f52b117b4d9131da1f41bb097ce/pydantic_core-2.46.4-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:db06ffe51636ffe9ca531fe9023dd64bdd794be8754cb5df57c5498ae5b518a7", size = 1952146, upload-time = "2026-05-06T13:39:43.092Z" }, - { url = "https://files.pythonhosted.org/packages/2a/dc/03734d80e362cd43ef65428e9de77c730ce7f2f11c60d2b1e1b39f0fbf99/pydantic_core-2.46.4-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:133878133d271ade3d41d1bfb2a45ec38dbdbda40bc065921c6b04e4630127e2", size = 2134492, upload-time = "2026-05-06T13:36:58.124Z" }, - { url = "https://files.pythonhosted.org/packages/de/df/5e5ffc085ed07cc22d298134d3d911c63e91f6a0eb91fe646750a3209910/pydantic_core-2.46.4-pp311-pypy311_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:9bc519fbf2b7578398853d815009ae5e4d4603d12f4e3f91da8c06852d3da3e9", size = 2156604, upload-time = "2026-05-06T13:37:49.88Z" }, - { url = "https://files.pythonhosted.org/packages/81/44/6e112a4253e56f5705467cbab7ab5e91ee7398ba3d56d358635958893d3e/pydantic_core-2.46.4-pp311-pypy311_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:c7a7bd4e39e8e4c12c39cd480356842b6a8a06e41b23a55a5e3e191718838ddf", size = 2183828, upload-time = "2026-05-06T13:37:43.053Z" }, - { url = "https://files.pythonhosted.org/packages/ac/ad/5565071e937d8e752842ac241463944c9eb14c87e2d269f2658a5bd05e98/pydantic_core-2.46.4-pp311-pypy311_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:d396ec2b979760aaf3218e76c24e65bd0aca24983298653b3a9d7a45f9e47b30", size = 2310000, upload-time = "2026-05-06T13:37:56.694Z" }, - { url = "https://files.pythonhosted.org/packages/4f/c3/66883a5cec183e7fba4d024b4cbbe61851a63750ef606b0afecc46d1f2bf/pydantic_core-2.46.4-pp311-pypy311_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:86e1a4418c6cd97d60c95c71164158eaf7324fae7b0923264016baa993eba6fc", size = 2361286, upload-time = "2026-05-06T13:40:05.667Z" }, - { url = "https://files.pythonhosted.org/packages/4b/2d/69abac8f838090bbecd5df894befb2c2619e7996a98ddb949db9f3b93225/pydantic_core-2.46.4-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:d51026d73fcfd93610abc7b27789c26b313920fcfb20e27462d74a7f8b06e983", size = 2193071, upload-time = "2026-05-06T13:38:08.682Z" }, -] - -[[package]] -name = "pydantic-settings" -version = "2.14.1" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "pydantic" }, - { name = "python-dotenv" }, - { name = "typing-inspection" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/07/60/1d1e59c9c90d54591469ada7d268251f71c24bdb765f1a8a832cee8c6653/pydantic_settings-2.14.1.tar.gz", hash = "sha256:e874d3bec7e787b0c9958277956ed9b4dd5de6a80e162188fdaff7c5e26fd5fa", size = 235551, upload-time = "2026-05-08T13:40:06.542Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/ae/8d/f1af3832f5e6eb13ba94ee809e72b8ecb5eef226d27ee0bef7d963d943c7/pydantic_settings-2.14.1-py3-none-any.whl", hash = "sha256:6e3c7edfd8277687cdc598f56e5cff0e9bfff0910a3749deaa8d4401c3a2b9de", size = 60964, upload-time = "2026-05-08T13:40:04.958Z" }, -] - -[[package]] -name = "pyright" -version = "1.1.410" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "nodeenv" }, - { name = "typing-extensions" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/10/53/e4d8ea1391bd4355231be6f91bf239479aa0014260ed3fb5526eeb12a1f2/pyright-1.1.410.tar.gz", hash = "sha256:07a073b8ba6749826773c1269773efa11b93440d9a6aa60419d9a3172d6dc488", size = 4062013, upload-time = "2026-06-01T17:35:48.894Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/d7/33/288b5868fa00846dacf249633719d747893e54aebd196b9968ac1878a5d3/pyright-1.1.410-py3-none-any.whl", hash = "sha256:5e961bed37cacf96b3f7cd7b1da39b350a9239aa2e69138d0e88f728cfaf296c", size = 6082448, upload-time = "2026-06-01T17:35:46.387Z" }, -] - -[[package]] -name = "python-dotenv" -version = "1.2.2" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/82/ed/0301aeeac3e5353ef3d94b6ec08bbcabd04a72018415dcb29e588514bba8/python_dotenv-1.2.2.tar.gz", hash = "sha256:2c371a91fbd7ba082c2c1dc1f8bf89ca22564a087c2c287cd9b662adde799cf3", size = 50135, upload-time = "2026-03-01T16:00:26.196Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/0b/d7/1959b9648791274998a9c3526f6d0ec8fd2233e4d4acce81bbae76b44b2a/python_dotenv-1.2.2-py3-none-any.whl", hash = "sha256:1d8214789a24de455a8b8bd8ae6fe3c6b69a5e3d64aa8a8e5d68e694bbcb285a", size = 22101, upload-time = "2026-03-01T16:00:25.09Z" }, -] - -[[package]] -name = "sqlalchemy" -version = "2.0.51" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "greenlet", marker = "platform_machine == 'AMD64' or platform_machine == 'WIN32' or platform_machine == 'aarch64' or platform_machine == 'amd64' or platform_machine == 'ppc64le' or platform_machine == 'win32' or platform_machine == 'x86_64'" }, - { name = "typing-extensions" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/02/f1/a7a892f18d4d224e6b26f706531eafccc41e37594d37d304786969ee13cb/sqlalchemy-2.0.51.tar.gz", hash = "sha256:804dccd8a4a6242c4e30ad961e540e18a588f6527202f2d6791b01845d59fdc9", size = 9912201, upload-time = "2026-06-15T15:41:20.012Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/3a/69/a67c69e5f28fc9c99d6f7bd60bd50e91f2fed2423e3b30fb228fa00e51f3/sqlalchemy-2.0.51-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1aa10c0daee6705294d181daadaa793221e1a59ed55000a3fab1d42b088ce4ba", size = 2161838, upload-time = "2026-06-15T16:05:17.144Z" }, - { url = "https://files.pythonhosted.org/packages/9a/a4/c8c22b8438bddc0a030157c6ec0f6ef97b3c38effa444bdab2a27af04090/sqlalchemy-2.0.51-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a5b2ed6d828f1f09bd812861f4f59ca3bc3803f9df871f4555187f0faf018604", size = 3319402, upload-time = "2026-06-15T16:10:40.002Z" }, - { url = "https://files.pythonhosted.org/packages/90/54/44012d32fd77d991256d2ff793ba3807c51d40cb27a85b4796224f6744df/sqlalchemy-2.0.51-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:436728ce18a80f6951a1e11cc6112c2ede9faf20766f1a26195a7c441ca12dbd", size = 3319675, upload-time = "2026-06-15T16:12:25.658Z" }, - { url = "https://files.pythonhosted.org/packages/29/a5/de0592acaf5906cd7430874392d6f7e8b4a7c8437610953ee2d1501c0b44/sqlalchemy-2.0.51-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:dc261707bf5739aea8a541593f3cc1d463c2701fb05fbcbba0ce031b69a21260", size = 3270777, upload-time = "2026-06-15T16:10:42.125Z" }, - { url = "https://files.pythonhosted.org/packages/cb/14/a44c90739c780b362238e4ac3cb19dd0ca40d13e6ddc5daa112166ddab4f/sqlalchemy-2.0.51-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:a6d26094615306d116dd5e4a51b0304c99dd2356fc569eed6922a80a6bd3b265", size = 3293940, upload-time = "2026-06-15T16:12:27.156Z" }, - { url = "https://files.pythonhosted.org/packages/65/eb/fbd0f206a330e66f8c602a99c37c4e731f107faed62954b41b01f16dd9d9/sqlalchemy-2.0.51-cp311-cp311-win32.whl", hash = "sha256:ca8435d13829b92f4a97362d91975154a4015db3a2634154e1754e9a915e6b86", size = 2121183, upload-time = "2026-06-15T16:13:29.905Z" }, - { url = "https://files.pythonhosted.org/packages/ad/fd/005bf80f3cf6e5c62b5dd68616280f51cd012c60840fa74781b3ed7b1623/sqlalchemy-2.0.51-cp311-cp311-win_amd64.whl", hash = "sha256:4a011ea4510683319ce4ed274b56ee05194b39b6da9d09ca7a39388f0fa84dcc", size = 2145796, upload-time = "2026-06-15T16:13:31.283Z" }, - { url = "https://files.pythonhosted.org/packages/d5/70/e868bc5412acd101a8280f25c95f10eeae0771c4eb806b02491142810ee8/sqlalchemy-2.0.51-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:7d78702b26ba1c18b2d0fb2ea940ba7f17a9581b42e8361ff93920ebbee1235a", size = 2160291, upload-time = "2026-06-15T16:08:48.918Z" }, - { url = "https://files.pythonhosted.org/packages/e5/1c/71ee0f8a6b9d7316a1ccd30430b4c62b6c2e36adc96017a4e3a72dce49d6/sqlalchemy-2.0.51-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:581921d849d6e6f994d560389192955e80e2950e18fcdfe2ccea863e01158e6e", size = 3343835, upload-time = "2026-06-15T16:19:42.613Z" }, - { url = "https://files.pythonhosted.org/packages/2b/7c/7ab9f9aadc5944fdd06612484ed7918fe376ad871a5f50404dc1536e0194/sqlalchemy-2.0.51-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1d21ce524ab86c23046e992a5b81cb54c21079c6df6e78b8fc77d77cac70a6b9", size = 3358470, upload-time = "2026-06-15T16:26:38.011Z" }, - { url = "https://files.pythonhosted.org/packages/d0/7d/ff77169fee6186de145a7f2b87006c39638391130abbab2b1f63ac6ea583/sqlalchemy-2.0.51-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:c5d98a2709840027f5a347c3af0a7c3d5f6c1ff93af2ca1c54494e23cba8f389", size = 3289874, upload-time = "2026-06-15T16:19:45.212Z" }, - { url = "https://files.pythonhosted.org/packages/6f/3b/6c505903710d781b55bc3141ee34a062bf9745a6b5bc7333305b9ed63b33/sqlalchemy-2.0.51-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:1181256e0f16479691b5616d36375dc2620ad8332b25978763c3d206ad3f3f1d", size = 3321692, upload-time = "2026-06-15T16:26:39.747Z" }, - { url = "https://files.pythonhosted.org/packages/3c/b7/c5ffe50aa2f4d947c9250e1519d939260329a07fe6272edfccd784b3d007/sqlalchemy-2.0.51-cp312-cp312-win32.whl", hash = "sha256:9f380393be5abeb6815f68fd39271b95127173511b6706b0a630a9995d53f8f5", size = 2119674, upload-time = "2026-06-15T16:23:09.543Z" }, - { url = "https://files.pythonhosted.org/packages/25/dc/46a65916af68a06ef6b972c6050ba4c8f97070fe3fb33097d34229d9bef6/sqlalchemy-2.0.51-cp312-cp312-win_amd64.whl", hash = "sha256:2cf39aabdf48e87c1c2c2ed6d20d33ffa0733b3071ce9c5f66357947dd009080", size = 2146670, upload-time = "2026-06-15T16:23:11.048Z" }, - { url = "https://files.pythonhosted.org/packages/54/fe/a210d52fd1a90ecfae8a78e9d8b27e18d733d60818a8bf250ff690b75120/sqlalchemy-2.0.51-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:7c2056838b6685b72fdb36c99996cf862753461a62f2e84f4196371d3b2d6a07", size = 2157184, upload-time = "2026-06-15T16:08:50.374Z" }, - { url = "https://files.pythonhosted.org/packages/17/6b/2dce8369b199cb855110e056032f94a9f66dacc2237d3d39c115a86eac56/sqlalchemy-2.0.51-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:483b11bd46bf35fc14c52faf338b04300c9e6ce554bce9b11be85bfec3bc3195", size = 3284735, upload-time = "2026-06-15T16:19:46.934Z" }, - { url = "https://files.pythonhosted.org/packages/53/ff/dbc495b8a14da840faffb353857a72d4190113cac33727906fb997047f0f/sqlalchemy-2.0.51-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1bed1ee8b01da6088210aa9412023326fb98a599ba502e6118308601dcbef77f", size = 3302756, upload-time = "2026-06-15T16:26:41.336Z" }, - { url = "https://files.pythonhosted.org/packages/cf/d5/fde8f4dddcf518ee15ab35a7c6a28acc32c8ba548d1d2aa451f96e6dbb0b/sqlalchemy-2.0.51-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:72ca54c952107ba5cd58854b67a5a6268631289d21651a1235396f3b98b47400", size = 3232055, upload-time = "2026-06-15T16:19:49.286Z" }, - { url = "https://files.pythonhosted.org/packages/67/d1/43d3a0ac955a58601c24fa23038b1c55ee3a1ec02c0f96ebb1eae2bcf614/sqlalchemy-2.0.51-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:b3e693d15533a45cd5906f0589f9c35090bef6ef45bf1e8195c424aa0ae06a8d", size = 3269850, upload-time = "2026-06-15T16:26:43.017Z" }, - { url = "https://files.pythonhosted.org/packages/94/df/de669c7054cd47c4439ac34b1b2ee8b804a794791fbb10720e997a2c87c7/sqlalchemy-2.0.51-cp313-cp313-win32.whl", hash = "sha256:b93ab07b5292dbe7e6b8da89475275e7042744283921344b56105f3eeb0f828b", size = 2117721, upload-time = "2026-06-15T16:23:12.36Z" }, - { url = "https://files.pythonhosted.org/packages/d0/8a/403c51d064196bae20a0bc2476577f83a3f8dd299719a97417086b7f2ec5/sqlalchemy-2.0.51-cp313-cp313-win_amd64.whl", hash = "sha256:0f053118c30e53161857a953e4de667d90e274980dccbe5dd3829bbbeece72a5", size = 2143615, upload-time = "2026-06-15T16:23:13.906Z" }, - { url = "https://files.pythonhosted.org/packages/b1/49/a739be2e1d02a96a658eb71ab45d921c874249252358ad24a5bffdd02525/sqlalchemy-2.0.51-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:6ea306caaae6bd5afd0a46050003c88f6bf33227377a49298c498c3cb88ff491", size = 2158999, upload-time = "2026-06-15T16:08:51.759Z" }, - { url = "https://files.pythonhosted.org/packages/23/6b/2e0e38cf75c8780eca78d9b2e78164f8bcfd70125e5caa588ff5cbb9c9f4/sqlalchemy-2.0.51-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c45a496d6bc05dec41dcd4c3a2b183723f47473255c159cd80b503c8f246424d", size = 3282539, upload-time = "2026-06-15T16:19:51.065Z" }, - { url = "https://files.pythonhosted.org/packages/dd/a1/e77854cb5336fd37dc3c6ae3b71de242c98caac5725120be0b526b31cbd0/sqlalchemy-2.0.51-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4004ada0aafe8ae1991b2cd1d99c6d9146126e123bd6f883c260d974aa012e54", size = 3287545, upload-time = "2026-06-15T16:26:44.735Z" }, - { url = "https://files.pythonhosted.org/packages/f6/ab/9e17272fd4dac8df3b83c4fbe52b998a1c9d89a843c8c35ff29b74ff7364/sqlalchemy-2.0.51-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:0f6bcad487aee1c638d707235682fc96f741de00663619881ab235400d03289e", size = 3230929, upload-time = "2026-06-15T16:19:52.625Z" }, - { url = "https://files.pythonhosted.org/packages/02/3c/52f408ea701781caee975606beccc48845f2aee8711ac29843d612c0306c/sqlalchemy-2.0.51-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:39a76529db6305693d8d4affa58ad5b5e2e18edd62daea628b29b97930b3513d", size = 3252888, upload-time = "2026-06-15T16:26:46.454Z" }, - { url = "https://files.pythonhosted.org/packages/24/16/3efd2ee6bc4ca4693a30a1dd17a91b606cae15d517d2a4746611d9b73ce8/sqlalchemy-2.0.51-cp314-cp314-win32.whl", hash = "sha256:08a204d8b5638717c26a24df18fcf40af45a6b22e35b70b1d62f0113c2e278e8", size = 2120551, upload-time = "2026-06-15T16:23:15.629Z" }, - { url = "https://files.pythonhosted.org/packages/7b/78/55b12e70f45bccc40d9e483925c065027b3b98ea4cbbdf6f8c2546feaf6c/sqlalchemy-2.0.51-cp314-cp314-win_amd64.whl", hash = "sha256:96747bfbadb055466e5b46d572618170046b45ce5a4879167f50d70a5319a499", size = 2146318, upload-time = "2026-06-15T16:23:17.108Z" }, - { url = "https://files.pythonhosted.org/packages/21/db/a9574ed40fed418924b1b1a3e54f47ee3963053b3d3d325a0d36b41f2c08/sqlalchemy-2.0.51-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:e5ea1a213be1fcd5e49d9904c3b9939211ded90bc2a64e93f4c01963474285de", size = 2178920, upload-time = "2026-06-15T15:59:56.285Z" }, - { url = "https://files.pythonhosted.org/packages/bf/90/a1bb5c7cbba76b7bc1fbd586d0a5479a7bc9c27b4a8298f22ec9423b2bb3/sqlalchemy-2.0.51-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:7c6b36ed71f41942bdcd2ad2522be46bfce09d5705be5640ecf19bbc7660e4b7", size = 3566534, upload-time = "2026-06-15T15:58:35.024Z" }, - { url = "https://files.pythonhosted.org/packages/15/4b/481f1fed30e0e9e8dd24aecbb49f29eb57fe7657ece5cf06ee9b84bb97d8/sqlalchemy-2.0.51-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0c2c62877097e1a0db401fba5cb4debee33265e5b2a55c4ccb489c02c53b4f72", size = 3535844, upload-time = "2026-06-15T16:02:43.973Z" }, - { url = "https://files.pythonhosted.org/packages/02/71/0aa64aeda645510af0a43f7d9ee70932f0d1dc4263aed34c50ee891d9df3/sqlalchemy-2.0.51-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:0378d055e9e8cd6ce4d8dff683bdd3d7d413533c4ee51d67a2b1e0f9eacc0f23", size = 3475355, upload-time = "2026-06-15T15:58:36.592Z" }, - { url = "https://files.pythonhosted.org/packages/05/db/6061db32316446135a3abae5f308d144ab988a34234726042da3e58b1c63/sqlalchemy-2.0.51-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:6e46fc36029eff666391e0531e5387b62ce6c4f1d8e50b3fb3099eaca1b42522", size = 3486591, upload-time = "2026-06-15T16:02:45.346Z" }, - { url = "https://files.pythonhosted.org/packages/0d/c9/f14fdf71bb8957e0c7e39db69bbdf12b5c80f4ef775fdfa127bf4e0d6760/sqlalchemy-2.0.51-cp314-cp314t-win32.whl", hash = "sha256:9161cfc9efce70d1715f47d6ff40f79c6778c00d53be4fbc09d70301e4b83ba7", size = 2151313, upload-time = "2026-06-15T16:03:39.127Z" }, - { url = "https://files.pythonhosted.org/packages/6a/c6/673e618e6f4f297e126d9b56ea2f6478708f6c1af4e3223835c22e2c3697/sqlalchemy-2.0.51-cp314-cp314t-win_amd64.whl", hash = "sha256:159bb6ba32059f57ad7375a8f50d844dd2f19d14954ecf820cd33e20debd46b2", size = 2186280, upload-time = "2026-06-15T16:03:40.569Z" }, - { url = "https://files.pythonhosted.org/packages/e2/22/dbf013a12ec759e54a34a119e9e217435b3f71b2dd5c61a7ade0a25dae87/sqlalchemy-2.0.51-py3-none-any.whl", hash = "sha256:bb024d8b621d0be75f4f44ecc7c950450026e76d66dc8f791bb5331d7fed59d5", size = 1944334, upload-time = "2026-06-15T16:09:22.418Z" }, -] - -[[package]] -name = "sqlalchemy-libsql" -version = "0.2.0" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "greenlet" }, - { name = "libsql-experimental" }, - { name = "sqlalchemy" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/9c/3e/a628dad23a5310e00db674a5ddf92300acb4199a06ea82385cc48f6e9289/sqlalchemy_libsql-0.2.0.tar.gz", hash = "sha256:f6349c89ea10b941a9cd87ebb65330c660aff996c12d3da7e1696572c360edd1", size = 6405, upload-time = "2025-05-30T17:59:14.812Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/a2/b9/7a3b645766a9f0f2ba27580d1ec6eb1ade754b30f0c88fcc6bee4cc2cb20/sqlalchemy_libsql-0.2.0-py3-none-any.whl", hash = "sha256:852a731c64f318581942c81a5e18c9752a553af25608abbff04cd54ae1f3d451", size = 5929, upload-time = "2025-05-30T17:59:13.913Z" }, -] - -[[package]] -name = "starlette" -version = "1.3.1" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "anyio" }, - { name = "typing-extensions", marker = "python_full_version < '3.13'" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/eb/e3/7c1dc7381d9f8ab7d854328ebfa884e62cb3f3d8549ddfd37c7814f42afa/starlette-1.3.1.tar.gz", hash = "sha256:05d0213193f2fbaae60e2ecb593b4add4262ad4e46536b54abe36f11a71724e0", size = 2703240, upload-time = "2026-06-12T09:23:11.602Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/ec/bb/2799cc2ede3ed41131f8975621e7213dfc7ef4acbbaadfa440f32500c370/starlette-1.3.1-py3-none-any.whl", hash = "sha256:c7372aae11c3c3f26a42df7bd626cec2f47d03483d261d369516a615a53714c6", size = 73632, upload-time = "2026-06-12T09:23:10.017Z" }, -] - -[[package]] -name = "typing-extensions" -version = "4.15.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz", hash = "sha256:0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466", size = 109391, upload-time = "2025-08-25T13:49:26.313Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/18/67/36e9267722cc04a6b9f15c7f3441c2363321a3ea07da7ae0c0707beb2a9c/typing_extensions-4.15.0-py3-none-any.whl", hash = "sha256:f0fa19c6845758ab08074a0cfa8b7aecb71c999ca73d62883bc25cc018c4e548", size = 44614, upload-time = "2025-08-25T13:49:24.86Z" }, -] - -[[package]] -name = "typing-inspection" -version = "0.4.2" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "typing-extensions" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/55/e3/70399cb7dd41c10ac53367ae42139cf4b1ca5f36bb3dc6c9d33acdb43655/typing_inspection-0.4.2.tar.gz", hash = "sha256:ba561c48a67c5958007083d386c3295464928b01faa735ab8547c5692e87f464", size = 75949, upload-time = "2025-10-01T02:14:41.687Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/dc/9b/47798a6c91d8bdb567fe2698fe81e0c6b7cb7ef4d13da4114b41d239f65d/typing_inspection-0.4.2-py3-none-any.whl", hash = "sha256:4ed1cacbdc298c220f1bd249ed5287caa16f34d44ef4e9c3d0cbad5b521545e7", size = 14611, upload-time = "2025-10-01T02:14:40.154Z" }, -] - -[[package]] -name = "uvicorn" -version = "0.49.0" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "click" }, - { name = "h11" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/c4/1f/fa18009dea8469069cca78a4e877a008ab78f08b064bfc9ab891579077ff/uvicorn-0.49.0.tar.gz", hash = "sha256:ebf4271aa580d9de97f93192d4595176df6e91f9aae919ca73e4fc07df1e66a3", size = 91284, upload-time = "2026-06-03T22:01:30.448Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/88/fa/e1388bbcf24ef3274f45c0c1c7b501fd14971037c1b6ee23610553307497/uvicorn-0.49.0-py3-none-any.whl", hash = "sha256:ba3d14c3ee7e41c6c654c46c9eb489d33213cdd30aa1696eab1374337c13f68f", size = 71376, upload-time = "2026-06-03T22:01:29.037Z" }, -] diff --git a/mermaid/.env-example b/mermaid/.env-example deleted file mode 100644 index 4aa6c57..0000000 --- a/mermaid/.env-example +++ /dev/null @@ -1,8 +0,0 @@ -# The domain name where the service will be accessible -SERVICE_DOMAIN=mermaid.example.com - -# The name of the external Docker network used by the reverse proxy (e.g., Traefik) -PROXY_NETWORK=proxy-net - -# The base name for the service, used in container names and Traefik labels -SERVICE_NAME=mermaid diff --git a/mermaid/.gitignore b/mermaid/.gitignore deleted file mode 100644 index 6374e27..0000000 --- a/mermaid/.gitignore +++ /dev/null @@ -1,15 +0,0 @@ -# Environment variables -.env - -# Docker -.docker/ - -# OS files -.DS_Store -Thumbs.db - -# Logs -*.log - -# Caches -.cache/ diff --git a/mermaid/README.md b/mermaid/README.md deleted file mode 100644 index 9078791..0000000 --- a/mermaid/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Mermaid Live Editor - -This folder contains the Docker Compose configuration for deploying the [Mermaid Live Editor](https://github.com/mermaid-js/mermaid-live-editor). - ---- - -## πŸš€ Deployment - -This service is managed as part of the unified Traefik deployments stack. - -To start: -```bash -appctl up mermaid -``` - -Refer to the root [README.md](../README.md) for details on how environment variables are securely injected at runtime. diff --git a/mermaid/docker-compose.yml b/mermaid/docker-compose.yml deleted file mode 100644 index b683cd9..0000000 --- a/mermaid/docker-compose.yml +++ /dev/null @@ -1,22 +0,0 @@ -services: - mermaid: - image: ghcr.io/mermaid-js/mermaid-live-editor:latest - container_name: ${SERVICE_NAME}-live-editor - restart: always - networks: - - proxy - labels: - - "traefik.enable=true" - - "traefik.http.routers.${SERVICE_NAME}.rule=Host(`${SERVICE_DOMAIN}`)" - - "traefik.http.routers.${SERVICE_NAME}.entrypoints=websecure" - - "traefik.http.routers.${SERVICE_NAME}.tls=true" - - "traefik.http.routers.${SERVICE_NAME}.service=${SERVICE_NAME}-svc" - - "traefik.http.routers.${SERVICE_NAME}-red.rule=Host(`${SERVICE_DOMAIN}`)" - - "traefik.http.routers.${SERVICE_NAME}-red.entrypoints=web" - - "traefik.http.routers.${SERVICE_NAME}-red.middlewares=https-redirect@docker" - - "traefik.http.services.${SERVICE_NAME}-svc.loadbalancer.server.port=8080" - -networks: - proxy: - name: ${PROXY_NETWORK} - external: true diff --git a/minecraft/README.md b/minecraft/README.md deleted file mode 100644 index ca1d0b3..0000000 --- a/minecraft/README.md +++ /dev/null @@ -1,29 +0,0 @@ -# Minecraft Server - -Minecraft server deployment powered by the highly configurable `itzg/minecraft-server` Docker image. - ---- - -## πŸš€ Deployment - -This service is managed as part of the unified Traefik deployments stack. - -To start: -```bash -./appctl up minecraft -``` - -Refer to the root [README.md](../README.md) for details on how environment variables are securely injected at runtime. - -## βš™οΈ Configuration Options - -The following environment variables can be customized in your `.env` file (or injected via your environment manager): - -| Variable | Description | Default | -|----------|-------------|---------| -| `MINECRAFT_CONTAINER_NAME` | The name of the Docker container | `minecraft-server` | -| `MINECRAFT_TYPE` | Server type (e.g. `VANILLA`, `PAPER`, `FORGE`, `FABRIC`) | `PAPER` | -| `MINECRAFT_VERSION` | Game version (e.g. `1.20.1`, `LATEST`) | `LATEST` | -| `MINECRAFT_MEMORY` | Memory allocation for the server (e.g. `2G`, `4G`) | `2G` | -| `MINECRAFT_PORT` | The host port to expose | `25565` | -| `MINECRAFT_DOMAIN` | Domain routing info (for documentation in `appctl status`) | `minecraft.arch-services.mywire.org` | diff --git a/minecraft/adr.md b/minecraft/adr.md deleted file mode 100644 index db07813..0000000 --- a/minecraft/adr.md +++ /dev/null @@ -1,40 +0,0 @@ -# Architecture Decision Record (ADR): Security, Concurrency, and Initialization for Web Admin Panel - -## Status -Approved - -## Context -When running the FastAPI Web Admin Panel container alongside the Paper MC Java container, several system-level issues arose due to shared resource limits, permission boundaries, and asynchronous start sequences: - -1. **Cross-Container Permission Deadlock**: The Python FastAPI container runs as `root` by default, whereas the Minecraft server container drops privileges to run as `1000:1000`. When FastAPI writes to the SQLite database, journaling files (`authme.db-journal`, `-wal`, or `-shm`) are created under `root` ownership. The Java server then crashes with a `Permission denied` error when trying to access or clear these database locks. -2. **SQLite Concurrency and Write-Locking**: Multiple processes (the Python API and the Java Minecraft process) access a single SQLite file (`authme.db`) concurrently. This can lead to database locking exceptions (`database is locked`) during write operations. -3. **Database Initialization Race Condition**: If the FastAPI container initializes faster than the Java Minecraft container (which takes up to a minute to download Paper, fetch plugins, and boot the JVM), FastAPI's `init_db()` will connect to a non-existent `authme.db` path, causing SQLite to write a blank database file. When the Java server boots later, it detects this empty database and fails or crashes due to unexpected schema states. -4. **Ephemeral Session State**: The JWT secret was dynamically generated on FastAPI startup. If the container crashed, restarted, or was redeployed, all active user sessions were invalidated, forcing administrators to sign in again. - ---- - -## Decisions - -### 1. Unified Container Privileges (Permissions) -We will run the FastAPI web application as `user: "1000:1000"` within `docker-compose.yml`. -* **Reasoning**: This binds the Python process to the same UID/GID as the Minecraft server. Any file written to the shared volume (including SQLite rollback journals) inherits `1000:1000` permissions, resolving any filesystem permission deadlocks. - -### 2. SQLite Write-Ahead Logging & Busy Timeout (Concurrency) -We will configure the SQLite connection in `database.py` to enable **Write-Ahead Logging (WAL)** and set a connection busy timeout of **5.0 seconds** (`5000` ms). -* **Reasoning**: WAL mode allows concurrent readers (e.g. players logging in, dashboard list requests) while a write is occurring, and the busy timeout ensures that if the database is temporarily locked, SQLite queues the write instead of failing immediately. - -### 3. Asynchronous Schema Polling & 503 Middleware (Initialization) -We will replace the synchronous startup database migration call with an asynchronous background task. -* **Database Polling**: The background loop checks if the `authme.db` file exists and queries SQLite's `sqlite_master` metadata table to ensure the `authme` table exists (which confirms AuthMe has finished setting up the schema). Only then does the web panel run its migrations for auxiliary tables (`user_roles`, `reset_requests`) and mark the database state as `DB_READY`. -* **Readiness Middleware**: Added a FastAPI middleware that intercepts all `/api/` traffic and returns a HTTP `503 Service Unavailable` error if `DB_READY` is still `False`. - -### 4. Session Persistence (JWT Secret Injection) -We will inject a static `JWT_SECRET` via the `docker-compose.yml` environment block, mapped to `MINECRAFT_JWT_SECRET` and managed via `.env` or NixOS secrets. -* **Reasoning**: Preserves cryptographical token validity across container updates and restarts. - ---- - -## Consequences -* **Permissions**: Zero file ownership conflict when containers update or write to shared volumes. -* **Parallel Performance**: Excellent multi-process read/write safety under SQLite without locking faults. -* **Resilient Startup**: The FastAPI web admin is start-order independent. It boots gracefully and awaits the Minecraft container's schema preparation before initializing itself, protecting database sanity. diff --git a/minecraft/docker-compose.yml b/minecraft/docker-compose.yml deleted file mode 100644 index 8c505fe..0000000 --- a/minecraft/docker-compose.yml +++ /dev/null @@ -1,49 +0,0 @@ -services: - minecraft: - image: itzg/minecraft-server:latest - container_name: ${CONTAINER_NAME:-minecraft-server} - restart: unless-stopped - ports: - - "${PORT:-25565}:25565" - environment: - - EULA=TRUE - - TYPE=${TYPE:-PAPER} - - VERSION=${VERSION:-LATEST} - - MEMORY=${MEMORY:-2G} - - TZ=${TZ:-UTC} - - ONLINE_MODE=FALSE - - PLUGINS=https://github.com/AuthMe/AuthMeReloaded/releases/download/5.6.0/AuthMe-5.6.0.jar - volumes: - - ./data:/data - networks: - - proxy - - web: - build: ./web - container_name: minecraft-web-admin - user: "1000:1000" - restart: unless-stopped - environment: - - JWT_SECRET=${MINECRAFT_JWT_SECRET:-supersecurejwtsecretvalueforlocaldevelopmentonly} - volumes: - - ./data/plugins/AuthMe:/app/db:rw - networks: - - proxy - labels: - - "traefik.enable=true" - # HTTPS Router - - "traefik.http.routers.minecraft-web.rule=Host(`${MINECRAFT_DOMAIN}`)" - - "traefik.http.routers.minecraft-web.entrypoints=websecure" - - "traefik.http.routers.minecraft-web.tls=true" - - "traefik.http.routers.minecraft-web.service=minecraft-web-svc" - # HTTP to HTTPS Redirect - - "traefik.http.routers.minecraft-web-red.rule=Host(`${MINECRAFT_DOMAIN}`)" - - "traefik.http.routers.minecraft-web-red.entrypoints=web" - - "traefik.http.routers.minecraft-web-red.middlewares=https-redirect@docker" - # Service definition - - "traefik.http.services.minecraft-web-svc.loadbalancer.server.port=8000" - -networks: - proxy: - name: ${PROXY_NETWORK:-proxy-net} - external: true diff --git a/minecraft/web/Dockerfile b/minecraft/web/Dockerfile deleted file mode 100644 index 44eceaa..0000000 --- a/minecraft/web/Dockerfile +++ /dev/null @@ -1,14 +0,0 @@ -FROM python:3.11-slim - -WORKDIR /app - -COPY requirements.txt . -RUN pip install --no-cache-dir -r requirements.txt - -COPY main.py database.py schemas.py services.py ./ -COPY routers/ routers/ -COPY templates/ templates/ - -EXPOSE 8000 - -CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"] diff --git a/minecraft/web/database.py b/minecraft/web/database.py deleted file mode 100644 index d8ddb3e..0000000 --- a/minecraft/web/database.py +++ /dev/null @@ -1,75 +0,0 @@ -import os -import sqlite3 - -DB_PATH = "/app/db/authme.db" -DB_READY = False - -def get_db(): - # Set a 5-second busy timeout for concurrent write queuing - conn = sqlite3.connect(DB_PATH, timeout=5.0) - # Enable Write-Ahead Logging (WAL) for concurrent read/write optimization - conn.execute("PRAGMA journal_mode=WAL;") - conn.row_factory = sqlite3.Row - return conn - -def init_db(): - conn = get_db() - cursor = conn.cursor() - - # Create roles table if it doesn't exist - cursor.execute(""" - CREATE TABLE IF NOT EXISTS user_roles ( - username VARCHAR(255) PRIMARY KEY, - role VARCHAR(50) NOT NULL DEFAULT 'player' - ) - """) - - # Create reset requests table if it doesn't exist - cursor.execute(""" - CREATE TABLE IF NOT EXISTS reset_requests ( - username VARCHAR(255) PRIMARY KEY, - status VARCHAR(50) NOT NULL DEFAULT 'pending', - requested_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP - ) - """) - - # Seed default admins - cursor.execute(""" - INSERT OR IGNORE INTO user_roles (username, role) - VALUES ('kiskaadee', 'admin') - """) - cursor.execute(""" - INSERT OR IGNORE INTO user_roles (username, role) - VALUES ('admin', 'admin') - """) - - conn.commit() - conn.close() - -def check_db_ready() -> bool: - global DB_READY - if DB_READY: - return True - - # Check if the database file exists first (non-blocking file check) - if not os.path.exists(DB_PATH): - return False - - try: - # Check if authme table exists - conn = get_db() - cursor = conn.cursor() - cursor.execute("SELECT name FROM sqlite_master WHERE type='table' AND name='authme'") - table_exists = cursor.fetchone() is not None - conn.close() - - if table_exists: - # Run our auxiliary table initializations - init_db() - DB_READY = True - return True - except Exception: - # Ignore errors during initial boot phase - pass - - return False diff --git a/minecraft/web/main.py b/minecraft/web/main.py deleted file mode 100644 index fcb3b2c..0000000 --- a/minecraft/web/main.py +++ /dev/null @@ -1,39 +0,0 @@ -import os -import asyncio -from fastapi import FastAPI, Request -from fastapi.responses import HTMLResponse, JSONResponse -import database -from routers import auth, users, admin - -app = FastAPI(title="Minecraft Identity Manager API") - -# Include Routers -app.include_router(auth.router) -app.include_router(users.router) -app.include_router(admin.router) - -# Readiness middleware to block API requests until database is ready -@app.middleware("http") -async def db_readiness_middleware(request: Request, call_next): - # Only intercept /api/ requests - if request.url.path.startswith("/api/") and not database.DB_READY: - return JSONResponse( - status_code=503, - content={"detail": "Authentication system is initializing, please try again shortly."} - ) - return await call_next(request) - -# Asynchronous background loop to poll database readiness -async def database_polling_loop(): - while not database.check_db_ready(): - await asyncio.sleep(2) - -@app.on_event("startup") -async def on_startup(): - asyncio.create_task(database_polling_loop()) - -@app.get("/", response_class=HTMLResponse) -def index(): - templates_dir = "/app/templates" - with open(os.path.join(templates_dir, "index.html"), "r") as f: - return f.read() diff --git a/minecraft/web/requirements.txt b/minecraft/web/requirements.txt deleted file mode 100644 index 5ef90ae..0000000 --- a/minecraft/web/requirements.txt +++ /dev/null @@ -1,4 +0,0 @@ -fastapi>=0.100.0 -uvicorn>=0.22.0 -pyjwt>=2.7.0 -python-multipart>=0.0.6 diff --git a/minecraft/web/routers/__init__.py b/minecraft/web/routers/__init__.py deleted file mode 100644 index d00f9ae..0000000 --- a/minecraft/web/routers/__init__.py +++ /dev/null @@ -1 +0,0 @@ -# Router Module Packager diff --git a/minecraft/web/routers/admin.py b/minecraft/web/routers/admin.py deleted file mode 100644 index 2e7d8ba..0000000 --- a/minecraft/web/routers/admin.py +++ /dev/null @@ -1,64 +0,0 @@ -from fastapi import APIRouter, Form, HTTPException, Depends, status -from typing import List, Optional -from schemas import CreateUserRequest, RoleChangeRequest -from services import PlayerService, ResetRequestService, require_admin - -router = APIRouter(prefix="", tags=["admin"]) - -@router.post("/api/users", status_code=status.HTTP_201_CREATED) -def create_user(req: CreateUserRequest, current_user: dict = Depends(require_admin)): - username = req.username.strip() - if not username or len(username) < 3: - raise HTTPException(status_code=400, detail="Username must be at least 3 characters") - - res = PlayerService.create_user( - username=username, - password_raw=req.password, - email=req.email, - role=req.role - ) - return {"message": f"Player {username} created successfully", "user": res} - -@router.delete("/api/users/{username}") -def delete_user(username: str, current_user: dict = Depends(require_admin)): - if username.lower() == current_user["username"].lower(): - raise HTTPException(status_code=400, detail="Cannot delete your own account") - - PlayerService.delete_user(username) - return {"message": f"Player {username} deleted successfully"} - -@router.post("/api/users/{username}/role") -def change_role(username: str, req: RoleChangeRequest, current_user: dict = Depends(require_admin)): - if username.lower() == current_user["username"].lower(): - raise HTTPException(status_code=400, detail="Cannot change your own role") - if req.role not in ["admin", "player"]: - raise HTTPException(status_code=400, detail="Invalid role. Must be 'admin' or 'player'") - - PlayerService.update_role(username, req.role) - return {"message": f"Role for {username} updated to {req.role}"} - -@router.get("/api/admin/reset-requests") -def list_reset_requests(current_user: dict = Depends(require_admin)): - return ResetRequestService.list_requests() - -@router.post("/api/admin/reset-requests/{username}/resolve") -def resolve_reset_request( - username: str, - action: str = Form(...), - new_password: Optional[str] = Form(None), - current_user: dict = Depends(require_admin) -): - if action == "approve": - if not new_password or len(new_password) < 5: - raise HTTPException(status_code=400, detail="A valid new password is required to approve the reset") - - PlayerService.update_password(username, new_password) - ResetRequestService.delete_request(username) - return {"message": f"Password reset for {username} approved and updated."} - - elif action == "reject": - ResetRequestService.delete_request(username) - return {"message": f"Reset request for {username} rejected."} - - else: - raise HTTPException(status_code=400, detail="Invalid action. Use 'approve' or 'reject'") diff --git a/minecraft/web/routers/auth.py b/minecraft/web/routers/auth.py deleted file mode 100644 index b802ca5..0000000 --- a/minecraft/web/routers/auth.py +++ /dev/null @@ -1,38 +0,0 @@ -from fastapi import APIRouter, Response, HTTPException, status, Depends -from schemas import LoginRequest -from services import AuthService, PlayerService, get_current_user - -router = APIRouter(prefix="/api", tags=["authentication"]) - -@router.post("/login") -def login(login_data: LoginRequest, response: Response): - username = login_data.username.strip() - password = login_data.password - - user = PlayerService.get_user_by_username(username) - - # We retrieve the raw password hash from player database to verify - if not user or not AuthService.verify_password(password, user["password"]): - raise HTTPException(status_code=status.HTTP_401_UNAUTHORIZED, detail="Invalid username or password") - - # Generate token - token = AuthService.create_jwt_token(username) - - response.set_cookie( - key="access_token", - value=token, - httponly=True, - max_age=43200, # 12 hours - samesite="lax" - ) - - return {"message": "Logged in successfully"} - -@router.post("/logout") -def logout(response: Response): - response.delete_cookie("access_token") - return {"message": "Logged out successfully"} - -@router.get("/me") -def get_me(current_user: dict = Depends(get_current_user)): - return current_user diff --git a/minecraft/web/routers/users.py b/minecraft/web/routers/users.py deleted file mode 100644 index 5843fe6..0000000 --- a/minecraft/web/routers/users.py +++ /dev/null @@ -1,36 +0,0 @@ -from fastapi import APIRouter, HTTPException, Depends -from typing import List -from schemas import UserResponse, ChangePasswordRequest, ResetRequest -from services import PlayerService, ResetRequestService, get_current_user - -router = APIRouter(prefix="/api", tags=["users"]) - -@router.get("/users", response_model=List[UserResponse]) -def list_users(current_user: dict = Depends(get_current_user)): - players = PlayerService.list_all_users() - - # Post-process for users who are not admins (mask email addresses) - for p in players: - if current_user["role"] != "admin" and p["username"].lower() != current_user["username"].lower(): - p["email"] = "β€’β€’β€’β€’@β€’β€’β€’β€’.β€’β€’β€’" if p.get("email") else None - - return players - -@router.post("/users/change-password") -def change_password(req: ChangePasswordRequest, current_user: dict = Depends(get_current_user)): - user = PlayerService.get_user_by_username(current_user["username"]) - if not user or not PlayerService.AuthService.verify_password(req.old_password, user["password"]): - raise HTTPException(status_code=400, detail="Incorrect old password") - - PlayerService.update_password(current_user["username"], req.new_password) - return {"message": "Password updated successfully"} - -@router.post("/reset-request") -def request_password_reset(req: ResetRequest): - username = req.username.strip() - user = PlayerService.get_user_by_username(username) - if not user: - raise HTTPException(status_code=404, detail="Player username not found") - - ResetRequestService.create_request(username) - return {"message": "Password reset request submitted. Please notify an administrator."} diff --git a/minecraft/web/schemas.py b/minecraft/web/schemas.py deleted file mode 100644 index 77b6de2..0000000 --- a/minecraft/web/schemas.py +++ /dev/null @@ -1,36 +0,0 @@ -from pydantic import BaseModel, EmailStr -from typing import Optional - -class LoginRequest(BaseModel): - username: str - password: str - -class UserResponse(BaseModel): - id: int - uuid: str - username: str - realname: str - email: Optional[str] = None - role: str - regdate: Optional[int] = None - -class CreateUserRequest(BaseModel): - username: str - password: str - email: Optional[str] = None - role: str = "player" - -class ChangePasswordRequest(BaseModel): - old_password: str - new_password: str - -class ResetRequest(BaseModel): - username: str - -class ResetRequestResponse(BaseModel): - username: str - status: str - requested_at: str - -class RoleChangeRequest(BaseModel): - role: str diff --git a/minecraft/web/services.py b/minecraft/web/services.py deleted file mode 100644 index 8ab2fd1..0000000 --- a/minecraft/web/services.py +++ /dev/null @@ -1,232 +0,0 @@ -import os -import sqlite3 -import secrets -import hashlib -import uuid -import jwt -import datetime -from typing import Optional, List -from fastapi import Request, Depends, HTTPException, status -from fastapi.security import APIKeyCookie -from database import get_db - -JWT_SECRET = os.environ.get("JWT_SECRET", secrets.token_hex(32)) -JWT_ALGORITHM = "HS256" -COOKIE_NAME = "access_token" - -cookie_scheme = APIKeyCookie(name=COOKIE_NAME, auto_error=False) - -class AuthService: - @staticmethod - def generate_salt() -> str: - return secrets.token_hex(8) - - @staticmethod - def hash_password(password: str, salt: str) -> str: - pass_hash = hashlib.sha256(password.encode('utf-8')).hexdigest() - combined = pass_hash + salt - final_hash = hashlib.sha256(combined.encode('utf-8')).hexdigest() - return f"$SHA${salt}${final_hash}" - - @staticmethod - def verify_password(password: str, authme_hash: str) -> bool: - try: - parts = authme_hash.split("$") - if len(parts) != 4 or parts[1] != "SHA": - return False - salt = parts[2] - stored_hash = parts[3] - - pass_hash = hashlib.sha256(password.encode('utf-8')).hexdigest() - combined = pass_hash + salt - computed_hash = hashlib.sha256(combined.encode('utf-8')).hexdigest() - return secrets.compare_digest(computed_hash, stored_hash) - except Exception: - return False - - @staticmethod - def create_jwt_token(username: str) -> str: - payload = { - "sub": username.lower(), - "exp": datetime.datetime.utcnow() + datetime.timedelta(hours=12) - } - return jwt.encode(payload, JWT_SECRET, algorithm=JWT_ALGORITHM) - - @staticmethod - def decode_jwt_token(token: str) -> Optional[str]: - try: - payload = jwt.decode(token, JWT_SECRET, algorithms=[JWT_ALGORITHM]) - return payload.get("sub") - except jwt.PyJWTError: - return None - -class PlayerService: - @staticmethod - def calculate_offline_uuid(username: str) -> str: - # Minecraft Java offline player UUID computation: UUID.nameUUIDFromBytes(("OfflinePlayer:" + username).getBytes(UTF_8)) - data = f"OfflinePlayer:{username}" - hash_digest = hashlib.md5(data.encode('utf-8')).digest() - offline_uuid = uuid.UUID(bytes=hash_digest, version=3) - return str(offline_uuid) - - @classmethod - def get_user_by_username(cls, username: str) -> Optional[dict]: - conn = get_db() - cursor = conn.cursor() - - cursor.execute("SELECT rowid, id, username, realname, email, regdate, password FROM authme WHERE LOWER(username) = LOWER(?)", (username,)) - row = cursor.fetchone() - - if not row: - conn.close() - return None - - # Get role - cursor.execute("SELECT role FROM user_roles WHERE LOWER(username) = LOWER(?)", (username,)) - role_row = cursor.fetchone() - role = role_row["role"] if role_row else "player" - - conn.close() - - user_dict = dict(row) - user_dict["role"] = role - user_dict["uuid"] = cls.calculate_offline_uuid(user_dict["realname"]) - if user_dict["id"] is None: - user_dict["id"] = user_dict["rowid"] - return user_dict - - @classmethod - def list_all_users(cls) -> List[dict]: - conn = get_db() - cursor = conn.cursor() - - cursor.execute("SELECT rowid, id, username, realname, email, regdate FROM authme") - players = [dict(row) for row in cursor.fetchall()] - - cursor.execute("SELECT username, role FROM user_roles") - roles = {row["username"].lower(): row["role"] for row in cursor.fetchall()} - - conn.close() - - for p in players: - p["role"] = roles.get(p["username"].lower(), "player") - p["uuid"] = cls.calculate_offline_uuid(p["realname"]) - if p["id"] is None: - p["id"] = p["rowid"] - - return players - - @classmethod - def create_user(cls, username: str, password_raw: str, email: Optional[str] = None, role: str = "player") -> dict: - salt = AuthService.generate_salt() - authme_hash = AuthService.hash_password(password_raw, salt) - - conn = get_db() - cursor = conn.cursor() - - # Calculate next ID manually since it isn't autoincremented natively by SQLite in AuthMe's default schema - cursor.execute("SELECT IFNULL(MAX(id), 0) + 1 as next_id FROM authme") - next_id = cursor.fetchone()["next_id"] - - try: - # Insert into authme - cursor.execute( - """ - INSERT INTO authme (id, username, realname, password, email, regdate) - VALUES (?, ?, ?, ?, ?, ?) - """, - (next_id, username.lower(), username, authme_hash, email, int(datetime.datetime.utcnow().timestamp() * 1000)) - ) - - # Insert role - cursor.execute( - "INSERT OR REPLACE INTO user_roles (username, role) VALUES (?, ?)", - (username.lower(), role) - ) - conn.commit() - except sqlite3.IntegrityError: - conn.close() - raise HTTPException(status_code=400, detail="Username already exists") - - conn.close() - return {"id": next_id, "username": username.lower(), "role": role} - - @staticmethod - def delete_user(username: str): - conn = get_db() - cursor = conn.cursor() - - cursor.execute("DELETE FROM authme WHERE LOWER(username) = LOWER(?)", (username,)) - cursor.execute("DELETE FROM user_roles WHERE LOWER(username) = LOWER(?)", (username,)) - cursor.execute("DELETE FROM reset_requests WHERE LOWER(username) = LOWER(?)", (username,)) - - conn.commit() - conn.close() - - @staticmethod - def update_password(username: str, new_password_raw: str): - salt = AuthService.generate_salt() - new_hash = AuthService.hash_password(new_password_raw, salt) - - conn = get_db() - cursor = conn.cursor() - cursor.execute("UPDATE authme SET password = ? WHERE LOWER(username) = LOWER(?)", (new_hash, username)) - conn.commit() - conn.close() - - @staticmethod - def update_role(username: str, role: str): - conn = get_db() - cursor = conn.cursor() - cursor.execute("INSERT OR REPLACE INTO user_roles (username, role) VALUES (?, ?)", (username.lower(), role)) - conn.commit() - conn.close() - -class ResetRequestService: - @staticmethod - def create_request(username: str): - conn = get_db() - cursor = conn.cursor() - cursor.execute( - "INSERT OR REPLACE INTO reset_requests (username, status, requested_at) VALUES (?, 'pending', CURRENT_TIMESTAMP)", - (username.lower(),) - ) - conn.commit() - conn.close() - - @staticmethod - def list_requests() -> List[dict]: - conn = get_db() - cursor = conn.cursor() - cursor.execute("SELECT username, status, requested_at FROM reset_requests WHERE status = 'pending' ORDER BY requested_at DESC") - rows = [dict(row) for row in cursor.fetchall()] - conn.close() - return rows - - @staticmethod - def delete_request(username: str): - conn = get_db() - cursor = conn.cursor() - cursor.execute("DELETE FROM reset_requests WHERE LOWER(username) = LOWER(?)", (username,)) - conn.commit() - conn.close() - -# Dependency Injection helpers -def get_current_user(cookie: Optional[str] = Depends(cookie_scheme)) -> dict: - if not cookie: - raise HTTPException(status_code=status.HTTP_401_UNAUTHORIZED, detail="Not authenticated") - - username = AuthService.decode_jwt_token(cookie) - if not username: - raise HTTPException(status_code=status.HTTP_401_UNAUTHORIZED, detail="Invalid session") - - user = PlayerService.get_user_by_username(username) - if not user: - raise HTTPException(status_code=status.HTTP_401_UNAUTHORIZED, detail="User not found") - - return {"username": user["username"], "role": user["role"]} - -def require_admin(current_user: dict = Depends(get_current_user)) -> dict: - if current_user["role"] != "admin": - raise HTTPException(status_code=status.HTTP_403_FORBIDDEN, detail="Admin permissions required") - return current_user diff --git a/minecraft/web/templates/index.html b/minecraft/web/templates/index.html deleted file mode 100644 index 4b80c43..0000000 --- a/minecraft/web/templates/index.html +++ /dev/null @@ -1,1197 +0,0 @@ - - - - - - Minecraft Identity Manager - - - - - - - - -
- -
-
- - username - PLAYER -
- -
-
- - -
-
-

Sign In

-

Access the Minecraft Identity Manager

-
-
- - -
-
- - -
- -
- -
-
- - -
-
- - - - -
- -
-
-

Dashboard

-
-
-
-

Total Players

-
0
-
-
-

Pending Password Resets

-
0
-
-
-

User Role

-
PLAYER
-
-
- -
- This web dashboard is integrated with the in-game authentication database. Any password resets or player additions here take effect immediately in the game next time a player connects. -
-
- - - - - - - - - -
-
-
- - - - - - - - - - - -
- - - - diff --git a/mongo-docker/.env-example b/mongo-docker/.env-example deleted file mode 100644 index be15807..0000000 --- a/mongo-docker/.env-example +++ /dev/null @@ -1,2 +0,0 @@ -MONGO_ROOT_USERNAME=admin -MONGO_ROOT_PASSWORD=supersecret diff --git a/mongo-docker/.gitignore b/mongo-docker/.gitignore deleted file mode 100644 index 4c49bd7..0000000 --- a/mongo-docker/.gitignore +++ /dev/null @@ -1 +0,0 @@ -.env diff --git a/mongo-docker/README.md b/mongo-docker/README.md deleted file mode 100644 index 5afe008..0000000 --- a/mongo-docker/README.md +++ /dev/null @@ -1,232 +0,0 @@ -# MongoDB Docker with Replica Set - -A Docker Compose setup for MongoDB 8.0 configured as a single-node replica set, enabling transaction support for development environments. - -## Features - -- βœ… MongoDB 8.0 with replica set configuration -- βœ… Transaction and session support -- βœ… Automatic replica set initialization -- βœ… Health checks and dependency management -- βœ… Persistent data storage -- βœ… Authentication enabled - -## Deployment - -This service is managed as part of the unified Traefik deployments stack. - -To start: -```bash -appctl up mongo-docker -``` - -Refer to the root [README.md](../README.md) for details on how environment variables are securely injected at runtime. - -## Connection Strings - -### For Applications - -Use this connection string format in your applications: - -``` -mongodb://admin:supersecret@localhost:27017/your_database?replicaSet=rs0&authSource=admin -``` - -### For Direct Connection - -Connect directly using MongoDB shell: - -```bash -# Using Docker -docker exec -it mongodb mongosh --username admin --password supersecret --authenticationDatabase admin - -# Or using local mongosh (if installed) -mongosh "mongodb://admin:supersecret@localhost:27017/admin?replicaSet=rs0" -``` - -**Note:** For security in production, use connection strings that prompt for passwords: - -```bash -mongosh "mongodb://admin@localhost:27017/admin?replicaSet=rs0" --authenticationDatabase admin -# You will be prompted to enter the password securely. -``` - -## Testing Transaction Support - -This setup supports multi-document transactions. You can test transaction functionality: - -```bash -# Copy and run the transaction test script -docker cp test_transaction.js mongodb:/tmp/test_transaction.js -docker exec mongodb mongosh -u admin -p supersecret --authenticationDatabase admin --file /tmp/test_transaction.js -``` - -## Live Server Deployment - -### Prerequisites for Production - -1. **Server Requirements:** - - Ubuntu/CentOS/RHEL server with Docker and Docker Compose installed - - Minimum 2GB RAM, 10GB free disk space - - Open port 27017 (or configure custom port) - - SSL/TLS certificates (recommended) - -2. **Security Considerations:** - - Change default credentials in `.env` file - - Use strong, randomly generated passwords - - Configure firewall rules to restrict access - - Consider using Docker secrets for sensitive data - - Enable MongoDB audit logging if needed - -### Step-by-Step Live Deployment - -#### 1. Server Setup - -```bash -# Update system packages -sudo apt update && sudo apt upgrade -y # Ubuntu/Debian -# OR -sudo yum update -y # CentOS/RHEL - -# Install Docker -curl -fsSL https://get.docker.com -o get-docker.sh -sudo sh get-docker.sh -sudo usermod -aG docker $USER - -# Install Docker Compose -sudo curl -L "https://github.com/docker/compose/releases/download/v2.21.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose -sudo chmod +x /usr/local/bin/docker-compose - -# Logout and login again for group changes to take effect -``` - -#### 2. Deploy MongoDB - -```bash -# Clone repository -git clone https://github.com/fcortesbio/mongo-docker.git -cd mongo-docker - -# Configure environment with strong credentials -cp .env-example .env -nano .env # Edit with strong passwords - -# Generate secure keyfile (already included) -ls -la keyfile # Should show 400 permissions - -# Start services -docker-compose up -d - -# Verify deployment -docker-compose ps -docker-compose logs -f -``` - -#### 3. Security Hardening - -```bash -# Configure firewall (UFW example) -sudo ufw allow ssh -sudo ufw allow 27017 # Or your custom MongoDB port -sudo ufw enable - -# Restrict MongoDB access to specific IPs (optional) -sudo ufw delete allow 27017 -sudo ufw allow from YOUR_APP_SERVER_IP to any port 27017 -``` - -#### 4. Configure Custom Domain/Port (Optional) - -To use a custom port or domain: - -```yaml -# In docker-compose.yml, change port mapping: -ports: - - "27018:27017" # Custom external port -``` - -For SSL/TLS, you can use a reverse proxy like nginx: - -```bash -# Install nginx -sudo apt install nginx - -# Configure nginx for MongoDB proxy with SSL -# This requires additional nginx stream module configuration -``` - -#### 5. Backup and Monitoring - -```bash -# Create backup script -cat > backup_mongo.sh << 'EOF' -#!/bin/bash -BACKUP_DIR="/backups/mongodb" -DATE=$(date +"%Y%m%d_%H%M%S") -mkdir -p $BACKUP_DIR - -docker exec mongodb mongodump --username admin --password supersecret --authenticationDatabase admin --out /tmp/backup_$DATE -docker cp mongodb:/tmp/backup_$DATE $BACKUP_DIR/ -docker exec mongodb rm -rf /tmp/backup_$DATE - -echo "Backup completed: $BACKUP_DIR/backup_$DATE" -EOF - -chmod +x backup_mongo.sh - -# Add to crontab for regular backups -# crontab -e -# 0 2 * * * /path/to/backup_mongo.sh -``` - -### Production Connection Strings - -#### For Applications (Production) - -```bash -# Use environment variables for credentials -mongodb://username:password@your-server.com:27017/database?replicaSet=rs0&authSource=admin&ssl=true -``` - -#### Health Check Endpoint - -```bash -# Test MongoDB health -docker exec mongodb mongosh --username admin --password supersecret --authenticationDatabase admin --eval "db.runCommand('ping')" -``` - -### Troubleshooting Live Deployment - -1. **Container keeps restarting:** - ```bash - docker logs mongodb - # Check keyfile permissions and replica set initialization - ``` - -2. **Cannot connect from external applications:** - ```bash - # Check firewall settings - sudo ufw status - - # Verify MongoDB is binding to all interfaces - docker exec mongodb mongosh --eval "db.runCommand({getCmdLineOpts: 1})" - ``` - -3. **Transaction failures:** - ```bash - # Verify replica set status - docker exec mongodb mongosh -u admin -p supersecret --authenticationDatabase admin --eval "rs.status()" - ``` - -4. **Performance issues:** - ```bash - # Check resource usage - docker stats mongodb - - # Consider increasing container resources in docker-compose.yml - deploy: - resources: - limits: - memory: 4G - cpus: '2' - ``` diff --git a/mongo-docker/WARP.md b/mongo-docker/WARP.md deleted file mode 100644 index 3141980..0000000 --- a/mongo-docker/WARP.md +++ /dev/null @@ -1,168 +0,0 @@ -# WARP.md - -This file provides guidance to WARP (warp.dev) when working with code in this repository. - -## Project Overview - -This is a Docker Compose setup for MongoDB 6.0 configured as a single-node replica set, specifically designed to enable transaction support in development environments. The project provides a production-ready MongoDB deployment with authentication, health checks, and automatic replica set initialization. - -## Architecture - -The setup consists of two Docker services: -- **mongo**: Main MongoDB 6.0 instance configured as replica set `rs0` with authentication -- **mongo-init**: Initialization container that automatically configures the replica set after MongoDB starts - -Key architectural decisions: -- Single-node replica set enables transaction support (required for multi-document ACID operations) -- Keyfile-based internal authentication for replica set communication -- Persistent data storage via Docker volumes -- Health check dependencies ensure proper startup sequence - -## Environment Setup - -1. **Copy environment configuration:** - ```bash - cp .env-example .env - ``` - -2. **Deploy MongoDB:** - ```bash - docker-compose up -d - ``` - -3. **Verify deployment:** - ```bash - docker-compose ps - docker-compose logs mongo-init - ``` - -## Common Commands - -### Development Operations - -**Start/Stop Services:** -```bash -docker-compose up -d # Start in background -docker-compose down # Stop and remove containers -docker-compose restart # Restart all services -``` - -**View Logs:** -```bash -docker-compose logs -f # Follow all logs -docker-compose logs mongo # View MongoDB logs -docker-compose logs mongo-init # View initialization logs -``` - -**Health Checks:** -```bash -docker-compose ps # Check container status -docker exec mongodb mongosh --username admin --password supersecret --authenticationDatabase admin --eval "db.runCommand('ping')" -``` - -### Database Operations - -**Connect to MongoDB:** -```bash -# Via Docker exec -docker exec -it mongodb mongosh --username admin --password supersecret --authenticationDatabase admin - -# Via external mongosh (if installed) -mongosh "mongodb://admin:supersecret@localhost:27017/admin?replicaSet=rs0" -``` - -**Check Replica Set Status:** -```bash -docker exec mongodb mongosh -u admin -p supersecret --authenticationDatabase admin --eval "rs.status()" -``` - -**Test Transactions:** -```bash -docker cp test_transaction.js mongodb:/tmp/test_transaction.js -docker exec mongodb mongosh -u admin -p supersecret --authenticationDatabase admin --file /tmp/test_transaction.js -``` - -### Data Management - -**Create Backup:** -```bash -# Create timestamped backup -DATE=$(date +"%Y%m%d_%H%M%S") -docker exec mongodb mongodump --username admin --password supersecret --authenticationDatabase admin --out /tmp/backup_$DATE -docker cp mongodb:/tmp/backup_$DATE ./backups/ -docker exec mongodb rm -rf /tmp/backup_$DATE -``` - -**Restore from Backup:** -```bash -docker cp ./backups/backup_TIMESTAMP mongodb:/tmp/restore -docker exec mongodb mongorestore --username admin --password supersecret --authenticationDatabase admin /tmp/restore -``` - -**Reset Database (Development):** -```bash -docker-compose down -docker volume rm mongo-docker_mongodb_data -docker-compose up -d -``` - -### Troubleshooting Commands - -**Container Diagnostics:** -```bash -docker stats mongodb # Resource usage -docker inspect mongodb # Container configuration -docker exec mongodb ps aux # Running processes -``` - -**MongoDB Diagnostics:** -```bash -# Check MongoDB configuration -docker exec mongodb mongosh -u admin -p supersecret --authenticationDatabase admin --eval "db.runCommand({getCmdLineOpts: 1})" - -# Check database connections -docker exec mongodb mongosh -u admin -p supersecret --authenticationDatabase admin --eval "db.runCommand('connPoolStats')" - -# List databases and collections -docker exec mongodb mongosh -u admin -p supersecret --authenticationDatabase admin --eval "show dbs" -``` - -## Connection Strings - -**Development (local applications):** -``` -mongodb://admin:supersecret@localhost:27017/your_database?replicaSet=rs0&authSource=admin -``` - -**Production (secure):** -``` -mongodb://admin@your-server.com:27017/your_database?replicaSet=rs0&authSource=admin&ssl=true -``` - -## File Structure - -- `docker-compose.yml`: Service definitions for MongoDB and initialization -- `.env-example`: Template for environment variables (credentials) -- `keyfile`: Pre-generated keyfile for replica set internal authentication (400 permissions) -- `test_transaction.js`: Transaction test script demonstrating multi-document ACID operations -- `README.md`: Comprehensive documentation including production deployment guide - -## Security Notes - -- Default credentials are in `.env-example` - change these for any non-development use -- The `keyfile` has restrictive permissions (400) and should not be modified -- For production: use Docker secrets, configure firewall rules, enable audit logging -- Authentication is required for all database operations - -## Production Deployment - -The project includes comprehensive production deployment instructions in README.md covering: -- Server setup and hardening -- SSL/TLS configuration options -- Backup automation scripts -- Monitoring and health checks -- Security considerations and firewall configuration - -## Transaction Support - -This setup specifically enables MongoDB transactions through replica set configuration. Use the included `test_transaction.js` to verify multi-document ACID operations are working correctly. \ No newline at end of file diff --git a/mongo-docker/docker-compose.yml b/mongo-docker/docker-compose.yml deleted file mode 100644 index fed0bba..0000000 --- a/mongo-docker/docker-compose.yml +++ /dev/null @@ -1,57 +0,0 @@ -services: - mongo: - image: mongo:8.0-noble - container_name: mongodb - restart: unless-stopped - environment: - MONGO_INITDB_ROOT_USERNAME: ${MONGO_ROOT_USERNAME} - MONGO_INITDB_ROOT_PASSWORD: ${MONGO_ROOT_PASSWORD} - ports: - - "27017:27017" - networks: - - proxy - labels: - - "traefik.enable=true" - - "traefik.tcp.routers.mongodb.rule=HostSNI(`${MONGO_DOMAIN}`)" - - "traefik.tcp.routers.mongodb.entrypoints=websecure" - - "traefik.tcp.routers.mongodb.tls=true" - - "traefik.tcp.routers.mongodb.tls.certresolver=${CERT_RESOLVER}" - - "traefik.tcp.routers.mongodb.service=mongodb-svc" - - "traefik.tcp.services.mongodb-svc.loadbalancer.server.port=27017" - volumes: - - mongodb_data:/data/db - - ./keyfile:/etc/mongodb-keyfile:ro - entrypoint: > - bash -c " - cp /etc/mongodb-keyfile /tmp/keyfile && - chmod 400 /tmp/keyfile && - chown mongodb:mongodb /tmp/keyfile && - exec docker-entrypoint.sh mongod --replSet rs0 --bind_ip_all --keyFile /tmp/keyfile - " - - mongo-init: - image: mongo:8.0-noble - depends_on: - - mongo - networks: - - proxy - entrypoint: > - bash -c "sleep 5 && - mongosh --host mongo:27017 - -u ${MONGO_ROOT_USERNAME} -p ${MONGO_ROOT_PASSWORD} - --authenticationDatabase admin - --eval ' - rs.initiate({ - _id: \"rs0\", - members: [{ _id: 0, host: \"mongo:27017\" }] - }) - ' || true" - restart: "no" - -volumes: - mongodb_data: - -networks: - proxy: - name: ${PROXY_NETWORK} - external: true diff --git a/mongo-docker/keyfile b/mongo-docker/keyfile deleted file mode 100644 index 6e0b190..0000000 --- a/mongo-docker/keyfile +++ /dev/null @@ -1,16 +0,0 @@ -9/9vkU3f3YhuNz2KIy+CrHQZBW58k38w+dInnqE+jq2LY25iuIHYz+o5VjW51TqM -9EZJ3WhM0XguG5sQw1mu7864CcNoRSYQk8NeW28B9FAMlnnvFTMmfEv0NnfmOzge -DLM8bZ+NAcDYP0Dx+v3G9G0mp0+3ZxNCOPOICZS4BgXea2sGLh2CyR5aXK5zeeJ8 -cPOopia90d787ntJGhLu+aKleaWWQt7xOGZAzX0Zbrdniwx/tR6/E9bLm58uN1vS -aw6E9coMj8hbBy3Qx7me1RWPc8BpDG2C0c18Rn7Ur4kNOdJX0CjZiO/CM90W69u0 -OubJQbXU1JMaMhgS0sDZk4kLiQbRC15TeAon32IGBxeOT7t0hrB2Fvs6IO+jAR3C -0vyucej6D8J2Gz9PtTSUCiLT2iwixFft/vXDZRAzDjewxtPml/luyDpx3kB789g0 -aSbevM86vN2DCI7pyAqgZmbVv7TR3+OeAVFIvDiSzr2dEu+sK7xzlOTFzW0woaRx -h++JRjydVSkqZ3kB+IdHOJgTJJxqzOGmQWyJFn1ms1LYi7vZNjeWasN15gZFIG5Z -jZte1A7pIhIsKBAgT7RRmcspDbMMz9M1UFUn56NRJfpjAqKWyUmhbGyvgnj7kUIX -YJoWm/yrFSchhOeLSybXvmB2aJdCBUJuVBBKbZer8f04fl4Yg0U+IpTGAvuPwWNX -B1hfPQj4k/5vMBIDsZhYa7h6oIqFMSy9b2SMayKPLu0D0mgmaDYJ5AH8/rQ97lOe -t698w1ghiHJ7k1KI8RI1AVqlyTwFHsLFpG1qqtvANOzEK+k7ZYegelIRyqJNhH1q -QSL4szwreywkJ/w+mMB9+OZCOX7wKiUmGO0yJe+HqSf7vgN6+1goJCmClmz1hsNy -r/KHehT8I/C83zqsU1aQp4OeqSjZDy50OoJ86Rwg6WxmmEQXceVgBpwIbUsYzvps -pIN17mPPBB/DTKiatsCLaPLdo7I9BtaxaZZsM1y3w+4rDqyN diff --git a/mongo-docker/test_transaction.js b/mongo-docker/test_transaction.js deleted file mode 100644 index 54336b0..0000000 --- a/mongo-docker/test_transaction.js +++ /dev/null @@ -1,67 +0,0 @@ -// Test multi-document transaction support -print("Testing multi-document transaction support..."); - -// Create test collections -db = db.getSiblingDB('testdb'); - -// Clear any existing test data -db.users.deleteMany({}); -db.accounts.deleteMany({}); - -print("Starting transaction test..."); - -const session = db.getMongo().startSession(); -session.startTransaction(); - -try { - const sessionDb = session.getDatabase('testdb'); - - // Insert into first collection within transaction - sessionDb.users.insertOne({ - _id: 1, - name: "Alice", - email: "alice@example.com" - }); - - // Insert into second collection within transaction - sessionDb.accounts.insertOne({ - _id: 1, - userId: 1, - balance: 1000 - }); - - // Update within transaction - sessionDb.accounts.updateOne( - {_id: 1}, - {$inc: {balance: -100}} - ); - - // Commit the transaction - session.commitTransaction(); - print("βœ… Transaction committed successfully!"); - -} catch (error) { - print("❌ Transaction failed: " + error); - session.abortTransaction(); -} finally { - session.endSession(); -} - -// Verify the data was committed -print("\nVerifying transaction results:"); -print("Users count: " + db.users.countDocuments()); -print("Accounts count: " + db.accounts.countDocuments()); - -const account = db.accounts.findOne({_id: 1}); -if (account) { - print("Final account balance: " + account.balance); - if (account.balance === 900) { - print("βœ… Multi-document transactions are working correctly!"); - } else { - print("❌ Transaction data inconsistent"); - } -} else { - print("❌ No account data found"); -} - -print("\nTransaction test completed."); \ No newline at end of file diff --git a/ollama/.env-example b/ollama/.env-example deleted file mode 100644 index 6f2383b..0000000 --- a/ollama/.env-example +++ /dev/null @@ -1,16 +0,0 @@ -# Ollama Service Configuration - Example - -# The domain name for the service -SERVICE_DOMAIN=ollama.yourdomain.com - -# API Key for X-Ollama-Key header authentication (Router 1) -OLLAMA_API_KEY=your-secure-api-key-here - -# The external Traefik proxy network name -PROXY_NETWORK=proxy-net - -# Number of replicas -REPLICAS=1 - -# Local volume name or path for ollama data -OLLAMA_DATA_VOLUME=ollama_data diff --git a/ollama/.gitignore b/ollama/.gitignore deleted file mode 100644 index 055dbad..0000000 --- a/ollama/.gitignore +++ /dev/null @@ -1,13 +0,0 @@ -# Environment variables -.env - -# Docker logs -logs/ -*.log - -# OS-specific files -.DS_Store -Thumbs.db - -# Application specific -ollama_data/ diff --git a/ollama/README.md b/ollama/README.md deleted file mode 100644 index 83e65a7..0000000 --- a/ollama/README.md +++ /dev/null @@ -1,24 +0,0 @@ -# Ollama - -This folder contains the Docker Compose configuration for deploying [Ollama](https://ollama.ai/), an open-source tool for running large language models locally. - ---- - -## πŸš€ Deployment - -This service is managed as part of the unified Traefik deployments stack. - -To start: -```bash -appctl up ollama -``` - -Refer to the root [README.md](../README.md) for details on how environment variables are securely injected at runtime. - ---- - -## πŸ”’ Security & Routing - -- **Router 1 (API):** Protected by `X-Ollama-Key` header authentication. -- **Router 2 (Browser):** Protected by [Authelia](https://www.authelia.com/) (external middleware). -- HTTPS is enforced via global redirection. diff --git a/ollama/docker-compose.yml b/ollama/docker-compose.yml deleted file mode 100644 index 7f87d42..0000000 --- a/ollama/docker-compose.yml +++ /dev/null @@ -1,56 +0,0 @@ -services: - ollama: - image: ollama/ollama:latest - deploy: - replicas: ${REPLICAS:-1} - restart_policy: - condition: on-failure - environment: - - OLLAMA_HOST=0.0.0.0 - - OLLAMA_ACCELERATE_SYSTEM=1 - devices: - - /dev/dri:/dev/dri - volumes: - - ${OLLAMA_DATA_VOLUME:-ollama_data}:/root/.ollama:rw - networks: - - proxy - labels: - - "traefik.enable=true" - # Router 1: API/Automation (Token-based) - - "traefik.http.routers.ollama-api.rule=Host(`${SERVICE_DOMAIN}`) && Header(`X-Ollama-Key`, `${OLLAMA_API_KEY}`)" - - "traefik.http.routers.ollama-api.entrypoints=websecure" - - "traefik.http.routers.ollama-api.tls=true" - - "traefik.http.routers.ollama-api.priority=100" - - "traefik.http.routers.ollama-api.service=ollama-svc" - - - "traefik.http.routers.ollama-api-red.rule=Host(`${SERVICE_DOMAIN}`) && Header(`X-Ollama-Key`, `${OLLAMA_API_KEY}`)" - - "traefik.http.routers.ollama-api-red.entrypoints=web" - - "traefik.http.routers.ollama-api-red.middlewares=https-redirect@docker" - - "traefik.http.routers.ollama-api-red.priority=100" - - # Router 2: Browser/Standard (Authelia Protected) - - "traefik.http.routers.ollama-browser.rule=Host(`${SERVICE_DOMAIN}`)" - - "traefik.http.routers.ollama-browser.entrypoints=websecure" - - "traefik.http.routers.ollama-browser.tls=true" - - "traefik.http.routers.ollama-browser.middlewares=authelia-auth@docker" - - "traefik.http.routers.ollama-browser.priority=50" - - "traefik.http.routers.ollama-browser.service=ollama-svc" - - - "traefik.http.routers.ollama-browser-red.rule=Host(`${SERVICE_DOMAIN}`)" - - "traefik.http.routers.ollama-browser-red.entrypoints=web" - - "traefik.http.routers.ollama-browser-red.middlewares=https-redirect@docker" - - "traefik.http.routers.ollama-browser-red.priority=50" - - # Shared Service - - "traefik.http.services.ollama-svc.loadbalancer.server.port=11434" - - - "traefik.http.services.ollama-svc.loadbalancer.healthcheck.path=/api/tags" - - "traefik.http.services.ollama-svc.loadbalancer.healthcheck.interval=10s" - -volumes: - ollama_data: - -networks: - proxy: - name: ${PROXY_NETWORK:-proxy-net} - external: true diff --git a/pgsql/docker-compose.yml b/pgsql/docker-compose.yml deleted file mode 100644 index 3ef64b9..0000000 --- a/pgsql/docker-compose.yml +++ /dev/null @@ -1,31 +0,0 @@ -services: - db: - image: postgres:16-alpine - container_name: postgres - restart: unless-stopped - environment: - POSTGRES_USER: ${POSTGRES_USER} - POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} - POSTGRES_DB: ${POSTGRES_DB} - ports: - - "5432:5432" - volumes: - - postgres_data:/var/lib/postgresql/data - networks: - - proxy - labels: - - "traefik.enable=true" - - "traefik.tcp.routers.postgres.rule=HostSNI(`${POSTGRES_DOMAIN}`)" - - "traefik.tcp.routers.postgres.entrypoints=websecure" - - "traefik.tcp.routers.postgres.tls=true" - - "traefik.tcp.routers.postgres.tls.certresolver=${CERT_RESOLVER}" - - "traefik.tcp.routers.postgres.service=postgres-svc" - - "traefik.tcp.services.postgres-svc.loadbalancer.server.port=5432" - -volumes: - postgres_data: - -networks: - proxy: - name: ${PROXY_NETWORK} - external: true diff --git a/snappymail/app.yaml b/snappymail/app.yaml new file mode 100644 index 0000000..8d3496b --- /dev/null +++ b/snappymail/app.yaml @@ -0,0 +1,22 @@ +schemaVersion: "1.0" +name: "snappymail" +aliases: + - "mail" + - "webmail" +description: "Modern Lightweight Webmail Client" +visible: true +auth: false +networks: + - proxy-net +deployment: + strategy: "compose" + branch: "main" + actions: + - git_pull + - compose_up +homepage: + title: "Webmail" + group: "Communication" + icon: "email.png" + container: "snappymail" + weight: 20 diff --git a/snappymail/docker-compose.yml b/snappymail/docker-compose.yml new file mode 100644 index 0000000..770984a --- /dev/null +++ b/snappymail/docker-compose.yml @@ -0,0 +1,28 @@ +services: + snappymail: + image: ghcr.io/the-djmaze/snappymail:${SNAPPYMAIL_VERSION:-latest} + container_name: ${CONTAINER_NAME:-snappymail} + restart: unless-stopped + volumes: + - ./data:/var/lib/snappymail/_data_ + networks: + - proxy-net + labels: + - "traefik.enable=true" + # HTTPS Webmail Router + - "traefik.http.routers.${CONTAINER_NAME:-snappymail}.rule=Host(`${SERVICE_DOMAIN}`)" + - "traefik.http.routers.${CONTAINER_NAME:-snappymail}.entrypoints=${HTTPS_ENTRYPOINT:-websecure}" + - "traefik.http.routers.${CONTAINER_NAME:-snappymail}.tls=true" + - "traefik.http.routers.${CONTAINER_NAME:-snappymail}.tls.certresolver=${CERT_RESOLVER:-myresolver}" + - "traefik.http.routers.${CONTAINER_NAME:-snappymail}.service=${CONTAINER_NAME:-snappymail}-svc" + # HTTP -> HTTPS Redirect Router + - "traefik.http.routers.${CONTAINER_NAME:-snappymail}-red.rule=Host(`${SERVICE_DOMAIN}`)" + - "traefik.http.routers.${CONTAINER_NAME:-snappymail}-red.entrypoints=${HTTP_ENTRYPOINT:-web}" + - "traefik.http.routers.${CONTAINER_NAME:-snappymail}-red.middlewares=${HTTPS_REDIRECT_MIDDLEWARE:-https-redirect@docker}" + # Upstream Service Port + - "traefik.http.services.${CONTAINER_NAME:-snappymail}-svc.loadbalancer.server.port=8888" + +networks: + proxy-net: + name: ${PROXY_NETWORK:-proxy-net} + external: true