feat: Add Open WebUI and code-server for AI development

Add Open WebUI for ChatGPT-like interface to local Ollama models
with RAG capabilities for documentation Q&A. Add code-server for
web-based VS Code access with AI coding assistants.

- Open WebUI accessible at ai.fig.systems
- code-server accessible at code.fig.systems
- Both integrated with local Ollama instance
This commit is contained in:
Eduardo Figueroa 2025-12-03 19:53:58 +00:00
parent 4a0be9ff93
commit fb25e9fea4
2 changed files with 97 additions and 0 deletions

View file

@ -0,0 +1,42 @@
# code-server - VS Code in the browser with AI coding support
# Docs: https://github.com/coder/code-server
services:
code-server:
container_name: code-server
image: lscr.io/linuxserver/code-server:latest
restart: unless-stopped
env_file:
- .env
volumes:
- ./config:/config
# Mount your homelab directory for editing
- /home/eduardo_figueroa/homelab:/config/workspace/homelab
networks:
- homelab
labels:
# Traefik
traefik.enable: true
traefik.docker.network: homelab
# Web UI
traefik.http.routers.code-server.rule: Host(`code.fig.systems`)
traefik.http.routers.code-server.entrypoints: websecure
traefik.http.routers.code-server.tls.certresolver: letsencrypt
traefik.http.services.code-server.loadbalancer.server.port: 8443
# SSO Protection
traefik.http.routers.code-server.middlewares: tinyauth
# Homarr Discovery
homarr.name: Code Server (IDE)
homarr.group: Services
homarr.icon: mdi:microsoft-visual-studio-code
networks:
homelab:
external: true

View file

@ -0,0 +1,55 @@
# Open WebUI - ChatGPT-style interface for Ollama
# Docs: https://docs.openwebui.com/
services:
open-webui:
container_name: open-webui
image: ghcr.io/open-webui/open-webui:main
restart: unless-stopped
env_file:
- .env
volumes:
- ./data:/app/backend/data
environment:
# Ollama connection
- OLLAMA_BASE_URL=http://ollama:11434
# Enable RAG (Retrieval-Augmented Generation)
- ENABLE_RAG_WEB_SEARCH=true
- RAG_WEB_SEARCH_ENGINE=searxng
# Web search (optional, requires searxng)
- ENABLE_RAG_WEB_SEARCH=false
# Default model
- DEFAULT_MODELS=qwen2.5-coder:7b
networks:
- homelab
labels:
# Traefik
traefik.enable: true
traefik.docker.network: homelab
# Web UI
traefik.http.routers.open-webui.rule: Host(`ai.fig.systems`)
traefik.http.routers.open-webui.entrypoints: websecure
traefik.http.routers.open-webui.tls.certresolver: letsencrypt
traefik.http.services.open-webui.loadbalancer.server.port: 8080
# No SSO - Open WebUI has its own auth system
# Uncomment to add SSO protection:
# traefik.http.routers.open-webui.middlewares: tinyauth
# Homarr Discovery
homarr.name: Open WebUI (AI Chat)
homarr.group: Services
homarr.icon: mdi:robot
networks:
homelab:
external: true