refactor: fusionne Honcho + OpenConcho dans un seul container nginx/FastAPI
- Honcho (FastAPI) et OpenConcho (React SPA) dans un seul Dockerfile multi-stage - nginx proxy /v3/ /v2/ /health /openapi.json vers Honcho sur localhost:8000 - Supprime le service openconcho séparé et le dossier orphelin - Routeur Traefik unique à honcho.lazyworkhorse.net (port 80 — nginx) - Plus besoin d'exposer Honcho séparément (API accessible via nginx proxy)
This commit is contained in:
@@ -161,13 +161,11 @@ services:
|
||||
- "303"
|
||||
- "26"
|
||||
|
||||
# --- Honcho: AI-native user modeling ---
|
||||
honcho:
|
||||
# --- Honcho + OpenConcho combiné: API + Web UI nginx/FastAPI ---
|
||||
honcho-ui:
|
||||
build: ./honcho
|
||||
container_name: honcho
|
||||
container_name: honcho-ui
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "127.0.0.1:8001:8000"
|
||||
environment:
|
||||
- DB_CONNECTION_URI=postgresql+psycopg://honcho:honcho_pass@honcho-db:5432/honcho
|
||||
- CACHE_URL=redis://honcho-redis:6379/0
|
||||
@@ -181,47 +179,27 @@ services:
|
||||
- ai_net
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.honcho-http.rule=Host(`api.honcho.lazyworkhorse.net`)"
|
||||
|
||||
# Router for HTTP + redirect to HTTPS
|
||||
- "traefik.http.routers.honcho-http.rule=Host(`honcho.lazyworkhorse.net`)"
|
||||
- "traefik.http.routers.honcho-http.entrypoints=web"
|
||||
- "traefik.http.routers.honcho-http.middlewares=redirect-to-https"
|
||||
- "traefik.http.routers.honcho-https.rule=Host(`api.honcho.lazyworkhorse.net`)"
|
||||
|
||||
# Router for HTTPS with TLS — protected by Authelia
|
||||
- "traefik.http.routers.honcho-https.rule=Host(`honcho.lazyworkhorse.net`)"
|
||||
- "traefik.http.routers.honcho-https.entrypoints=websecure"
|
||||
- "traefik.http.routers.honcho-https.tls=true"
|
||||
- "traefik.http.routers.honcho-https.tls.certresolver=njalla"
|
||||
- "traefik.http.routers.honcho-https.middlewares=hermes-auth"
|
||||
- "traefik.http.services.honcho.loadbalancer.server.port=8000"
|
||||
|
||||
# Service Loadbalancer (nginx port)
|
||||
- "traefik.http.services.honcho.loadbalancer.server.port=80"
|
||||
depends_on:
|
||||
honcho-db:
|
||||
condition: service_healthy
|
||||
honcho-redis:
|
||||
condition: service_healthy
|
||||
|
||||
# --- OpenConcho: Honcho web UI ---
|
||||
openconcho:
|
||||
build: ./openconcho
|
||||
container_name: openconcho
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- ai_backend
|
||||
- ai_net
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
|
||||
# Router for HTTP + redirect to HTTPS
|
||||
- "traefik.http.routers.openconcho-http.rule=Host(`honcho.lazyworkhorse.net`)"
|
||||
- "traefik.http.routers.openconcho-http.entrypoints=web"
|
||||
- "traefik.http.routers.openconcho-http.middlewares=redirect-to-https"
|
||||
|
||||
# Router for HTTPS with TLS — protected by Authelia
|
||||
- "traefik.http.routers.openconcho-https.rule=Host(`honcho.lazyworkhorse.net`)"
|
||||
- "traefik.http.routers.openconcho-https.entrypoints=websecure"
|
||||
- "traefik.http.routers.openconcho-https.tls=true"
|
||||
- "traefik.http.routers.openconcho-https.tls.certresolver=njalla"
|
||||
- "traefik.http.routers.openconcho-https.middlewares=hermes-auth"
|
||||
|
||||
# Service Loadbalancer
|
||||
- "traefik.http.services.openconcho.loadbalancer.server.port=80"
|
||||
|
||||
honcho-db:
|
||||
image: pgvector/pgvector:pg15
|
||||
container_name: honcho-db
|
||||
|
||||
Reference in New Issue
Block a user