fix(env): clarify WEBUI_AUTH comment in .env.example #5
@@ -0,0 +1,39 @@
|
|||||||
|
|
|||||||
|
# d0a1 quickstart - configuracion por defecto
|
||||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
|||||||
|
# Copia este archivo como .env y edita segun necesites:
|
||||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
|||||||
|
# cp .env.example .env
|
||||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
|||||||
|
|
||||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
|||||||
|
# --- Puertos ----------------------------------------------------------------
|
||||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
|||||||
|
|
||||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
|||||||
|
# Puerto de Open WebUI (interfaz web)
|
||||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
|||||||
|
WEBUI_PORT=3000
|
||||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
|||||||
|
|
||||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
|||||||
|
# Puerto de Ollama (API del motor de IA)
|
||||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
|||||||
|
OLLAMA_PORT=11434
|
||||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
|||||||
|
|
||||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
|||||||
|
# --- Seguridad --------------------------------------------------------------
|
||||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
|||||||
|
|
||||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
|||||||
|
# Si false, desactiva el login de Open WebUI.
|
||||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
|||||||
|
# Recomendado solo para uso personal en local.
|
||||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
|||||||
|
# NO expongas el puerto a internet sin autenticacion. Mantener en true.
|
||||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
|||||||
|
# Valores validos: true | false
|
||||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
|||||||
|
WEBUI_AUTH=true
|
||||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
|||||||
|
|
||||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
|||||||
|
# Clave de sesion de Open WebUI. Cambiala en cualquier despliegue real.
|
||||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
|||||||
|
# Genera una con: openssl rand -hex 32
|
||||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
|||||||
|
WEBUI_SECRET_KEY=
|
||||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
|||||||
|
|
||||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
|||||||
|
# --- Modelos ----------------------------------------------------------------
|
||||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
|||||||
|
|
||||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
|||||||
|
# Modelo que Open WebUI sugiere al usuario al registrarse.
|
||||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
|||||||
|
# Requisitos de RAM aproximados (Q4_K_M):
|
||||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
|||||||
|
# llama3.2:1b - 1 GB
|
||||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
|||||||
|
# llama3.2:3b - 2 GB (por defecto, cualquiera con 8 GB puede)
|
||||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
|||||||
|
# qwen2.5:7b - 5 GB
|
||||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
|||||||
|
# llama3.1:8b - 5 GB
|
||||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
|||||||
|
# codellama:7b - 5 GB
|
||||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
|||||||
|
DEFAULT_MODEL=llama3.2:3b
|
||||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
|||||||
|
|
||||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
|||||||
|
# Tiempo que Ollama mantiene un modelo en memoria tras la ultima peticion.
|
||||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
|||||||
|
# Usa '0' para descargar el modelo tras cada uso (libera RAM).
|
||||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
|||||||
|
# Usa '-1' para mantenerlo siempre cargado.
|
||||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
|||||||
|
OLLAMA_KEEP_ALIVE=5m
|
||||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
# Garantiza que los scripts se guarden con saltos de línea Unix (LF),
|
# Normaliza todos los archivos de texto a LF en checkout/merge
|
||||||
# incluso en clones desde Windows. Evita que `bash deploy.sh` rompa
|
# para evitar problemas con deploy.sh en WSL/Git Bash.
|
||||||
# con errores tipo "$'\r': command not found" en WSL / Git Bash.
|
* text=auto eol=lf
|
||||||
*.sh text eol=lf
|
|
||||||
*.bash text eol=lf
|
|
||||||
|
|
||||||
# Documentación también en LF para consistencia.
|
# Tratar como binarios
|
||||||
*.md text eol=lf
|
*.png binary
|
||||||
*.yml text eol=lf
|
*.jpg binary
|
||||||
*.yaml text eol=lf
|
*.ico binary
|
||||||
|
*.msi binary
|
||||||
|
*.pdf binary
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
# Configuracion local (no commitear - contiene secretos)
|
||||||
|
.env
|
||||||
|
|
||||||
|
# Volumenes Docker (gestion por docker compose)
|
||||||
|
# Si necesitas persistencia, los volumenes named se crean en docker volume ls.
|
||||||
|
|
||||||
|
# OS / editor cruft
|
||||||
|
.DS_Store
|
||||||
|
Thumbs.db
|
||||||
|
*.swp
|
||||||
|
*.swo
|
||||||
|
*~
|
||||||
|
.vscode/
|
||||||
|
.idea/
|
||||||
|
|
||||||
|
# Logs
|
||||||
|
*.log
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2026 d0a1.es
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
@@ -8,6 +8,12 @@ Un comando y tendrás un asistente de IA corriendo **en tu propia máquina**.
|
|||||||
Sin enviar datos a terceros. Sin pagar por tokens. Sin crear cuentas.
|
Sin enviar datos a terceros. Sin pagar por tokens. Sin crear cuentas.
|
||||||
Usa modelos de lenguaje de código abierto (Ollama) con una interfaz web moderna (Open WebUI).
|
Usa modelos de lenguaje de código abierto (Ollama) con una interfaz web moderna (Open WebUI).
|
||||||
|
|
||||||
|
Este repo forma parte del ecosistema **d0a1.es**: un conjunto de servicios
|
||||||
|
self-hosted que demuestran que la IA útil no requiere ceder tus datos a
|
||||||
|
terceros. El quickstart es la puerta de entrada: el resto de servicios
|
||||||
|
(Gitea, mail, aplicaciones internas) están disponibles bajo el mismo paraguas
|
||||||
|
en [d0a1.es](https://d0a1.es).
|
||||||
|
|
||||||
## Requisitos
|
## Requisitos
|
||||||
|
|
||||||
| Requisito | Mínimo | Recomendado |
|
| Requisito | Mínimo | Recomendado |
|
||||||
@@ -17,21 +23,26 @@ Usa modelos de lenguaje de código abierto (Ollama) con una interfaz web moderna
|
|||||||
| Sistema | Linux, macOS, Windows (WSL2) | Linux |
|
| Sistema | Linux, macOS, Windows (WSL2) | Linux |
|
||||||
| Software | Docker + Docker Compose v2 | Docker + Docker Compose v2 |
|
| Software | Docker + Docker Compose v2 | Docker + Docker Compose v2 |
|
||||||
|
|
||||||
|
> **Importante:** con 8 GB de RAM, usa modelos de hasta 7B cuantizados (Q4).
|
||||||
|
> Los modelos de 8B funcionan en CPU pero pueden ralentizar el sistema bajo carga.
|
||||||
|
|
||||||
## Instalación
|
## Instalación
|
||||||
|
|
||||||
### Opción rápida (recomendada)
|
### Opción rápida (recomendada)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone https://git.d0a1.es/devops/quickstart.git
|
git clone https://git.d0a1.es/d0a1/quickstart.git
|
||||||
cd quickstart
|
cd quickstart
|
||||||
|
cp .env.example .env
|
||||||
./deploy.sh
|
./deploy.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
### Opción manual
|
### Opción manual
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone https://git.d0a1.es/devops/quickstart.git
|
git clone https://git.d0a1.es/d0a1/quickstart.git
|
||||||
cd quickstart
|
cd quickstart
|
||||||
|
cp .env.example .env
|
||||||
docker compose up -d
|
docker compose up -d
|
||||||
# Esperar ~30s a que Ollama arranque
|
# Esperar ~30s a que Ollama arranque
|
||||||
docker exec d0a1-ollama ollama pull llama3.2:3b
|
docker exec d0a1-ollama ollama pull llama3.2:3b
|
||||||
@@ -45,24 +56,40 @@ Abre tu navegador en **http://localhost:3000**
|
|||||||
- **Open WebUI** — Interfaz web tipo ChatGPT, pero local y privada.
|
- **Open WebUI** — Interfaz web tipo ChatGPT, pero local y privada.
|
||||||
- **llama3.2:3b** — Modelo inicial ligero (~2 GB). Buen punto de partida.
|
- **llama3.2:3b** — Modelo inicial ligero (~2 GB). Buen punto de partida.
|
||||||
|
|
||||||
|
## Configuración
|
||||||
|
|
||||||
|
Toda la configuración se gestiona vía el archivo `.env` (copia `.env.example`):
|
||||||
|
|
||||||
|
| Variable | Por defecto | Descripción |
|
||||||
|
|----------|-------------|-------------|
|
||||||
|
| `WEBUI_PORT` | 3000 | Puerto de Open WebUI |
|
||||||
|
| `OLLAMA_PORT` | 11434 | Puerto de Ollama |
|
||||||
|
| `WEBUI_AUTH` | `true` | Si `false`, desactiva el login. **Recomendado solo para uso personal en local** — no exponer a internet sin autenticación. |
|
||||||
|
| `DEFAULT_MODEL` | `llama3.2:3b` | Modelo que Open WebUI sugiere al registrarse |
|
||||||
|
| `OLLAMA_KEEP_ALIVE` | `5m` | Tiempo que Ollama mantiene un modelo en memoria tras usarlo |
|
||||||
|
| `WEBUI_SECRET_KEY` | *(generar)* | Clave de sesión de Open WebUI. **Cámbiala en producción.** Genera una con: `openssl rand -hex 32` |
|
||||||
|
|
||||||
## Añadir modelos
|
## Añadir modelos
|
||||||
|
|
||||||
Cuanta más RAM tengas, mejores modelos puedes usar:
|
Cuanta más RAM tengas, mejores modelos puedes usar:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Mejor en español (5 GB RAM)
|
# Mejor en español (8 GB RAM)
|
||||||
docker exec d0a1-ollama ollama pull qwen2.5:7b
|
docker exec d0a1-ollama ollama pull qwen2.5:7b
|
||||||
|
|
||||||
# Más inteligente (6 GB RAM)
|
# Más inteligente (8 GB RAM)
|
||||||
docker exec d0a1-ollama ollama pull llama3.1:8b
|
docker exec d0a1-ollama ollama pull llama3.1:8b
|
||||||
|
|
||||||
# Para programar (5 GB RAM)
|
# Para programar (8 GB RAM)
|
||||||
docker exec d0a1-ollama ollama pull codellama:7b
|
docker exec d0a1-ollama ollama pull codellama:7b
|
||||||
|
|
||||||
# Listar modelos instalados
|
# Listar modelos instalados
|
||||||
docker exec d0a1-ollama ollama list
|
docker exec d0a1-ollama ollama list
|
||||||
```
|
```
|
||||||
|
|
||||||
|
> Los tiempos de respuesta de los modelos grandes son sensiblemente mejores
|
||||||
|
> con GPU. En CPU funcionan, pero pueden tardar varios segundos por respuesta.
|
||||||
|
|
||||||
## Comandos
|
## Comandos
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
@@ -74,17 +101,16 @@ docker exec d0a1-ollama ollama pull MODELO # Descargar otro modelo
|
|||||||
|
|
||||||
## ¿Y después?
|
## ¿Y después?
|
||||||
|
|
||||||
Esto es solo el principio. El stack completo d0a1 añade:
|
Esto es solo el principio. El stack completo d0a1 incluye servicios
|
||||||
|
auto-hospedados en [d0a1.es](https://d0a1.es):
|
||||||
|
|
||||||
|
- **git.d0a1.es** — Gitea, repositorios Git con Pull Requests y code review
|
||||||
|
- **mail.d0a1.es** — Webmail SnappyMail
|
||||||
|
- **app.d0a1.es** — Aplicaciones internas
|
||||||
- **Hermes Agent** — Agente autónomo con memoria, skills y 14+ plataformas
|
- **Hermes Agent** — Agente autónomo con memoria, skills y 14+ plataformas
|
||||||
- **n8n** — Automatizaciones visuales sin código
|
|
||||||
- **Qdrant** — Base de datos vectorial para búsqueda semántica
|
|
||||||
- **WordPress** — CMS con IA integrada
|
|
||||||
- **Correo, backups, HTTPS** — Todo automatizado
|
|
||||||
|
|
||||||
Si la IA local te sabe a poco, despliega el stack completo en un VPS:
|
Todos los servicios son open source, usan solo HTTPS 443 y se pueden
|
||||||
|
ejecutar en una sola máquina.
|
||||||
**[d0a1.es/vps](https://d0a1.es/vps)** — Desde 6€/mes, todo incluido
|
|
||||||
|
|
||||||
## Preguntas frecuentes
|
## Preguntas frecuentes
|
||||||
|
|
||||||
@@ -124,6 +150,27 @@ Esto ocurre sobre todo cuando se descarga el archivo desde un navegador
|
|||||||
en Windows o se edita con el bloc de notas. Con `git clone` desde
|
en Windows o se edita con el bloc de notas. Con `git clone` desde
|
||||||
cualquier sistema queda en LF automáticamente.
|
cualquier sistema queda en LF automáticamente.
|
||||||
|
|
||||||
|
### El modelo no carga / `model requires more system memory`
|
||||||
|
|
||||||
|
Has intentado descargar un modelo demasiado grande para tu RAM. Elimínalo
|
||||||
|
y prueba con uno más pequeño:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker exec d0a1-ollama ollama rm llama3.1:8b
|
||||||
|
docker exec d0a1-ollama ollama pull llama3.2:3b
|
||||||
|
```
|
||||||
|
|
||||||
|
### Open WebUI no arranca / `address already in use`
|
||||||
|
|
||||||
|
Tienes otro servicio en el puerto 3000 (o el que configuraste en `.env`).
|
||||||
|
Cámbialo en `.env`:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
WEBUI_PORT=8080
|
||||||
|
```
|
||||||
|
|
||||||
|
Y reinicia: `docker compose down && docker compose up -d`.
|
||||||
|
|
||||||
## Licencia
|
## Licencia
|
||||||
|
|
||||||
MIT. Usa, modifica y comparte libremente.
|
MIT. Usa, modifica y comparte libremente.
|
||||||
|
|||||||
@@ -1,116 +1,121 @@
|
|||||||
#!/bin/bash
|
#!/usr/bin/env bash
|
||||||
# ──────────────────────────────────────────────
|
# d0a1 quickstart deployment script
|
||||||
# d0a1 quickstart — IA agéntica local, sin coste
|
# Sube Ollama + Open WebUI en Docker. Lee configuracion de .env.
|
||||||
# ──────────────────────────────────────────────
|
set -euo pipefail
|
||||||
# Ejecuta: curl -fsSL https://d0a1.es/quickstart | bash
|
|
||||||
# o: ./deploy.sh
|
|
||||||
# Abre: http://localhost:3000
|
|
||||||
# ──────────────────────────────────────────────
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# Colores
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
GREEN='\033[0;32m'
|
cd "$SCRIPT_DIR"
|
||||||
CYAN='\033[0;36m'
|
|
||||||
YELLOW='\033[0;33m'
|
|
||||||
RED='\033[0;31m'
|
|
||||||
BOLD='\033[1m'
|
|
||||||
NC='\033[0m'
|
|
||||||
|
|
||||||
echo ""
|
# --- Color helpers -----------------------------------------------------------
|
||||||
echo -e "${BOLD}${CYAN}╔══════════════════════════════════════════╗${NC}"
|
if [ -t 1 ]; then
|
||||||
echo -e "${BOLD}${CYAN}║ d0a1 quickstart — IA local, sin coste ║${NC}"
|
BOLD="\033[1m"; GREEN="\033[32m"; YELLOW="\033[33m"; RED="\033[31m"; RESET="\033[0m"
|
||||||
echo -e "${BOLD}${CYAN}╚══════════════════════════════════════════╝${NC}"
|
else
|
||||||
echo ""
|
BOLD=""; GREEN=""; YELLOW=""; RED=""; RESET=""
|
||||||
|
fi
|
||||||
|
info() { printf "%b\n" "${BOLD}${GREEN}>>>${RESET} $*"; }
|
||||||
|
warn() { printf "%b\n" "${BOLD}${YELLOW}>>>${RESET} $*"; }
|
||||||
|
err() { printf "%b\n" "${BOLD}${RED}>>>${RESET} $*" >&2; }
|
||||||
|
|
||||||
# ── 1. Comprobar Docker ──────────────────────
|
# --- Pre-flight checks -------------------------------------------------------
|
||||||
echo -e "${YELLOW}[1/4]${NC} Comprobando Docker..."
|
|
||||||
|
|
||||||
if ! command -v docker &>/dev/null; then
|
if ! command -v docker >/dev/null 2>&1; then
|
||||||
echo -e "${RED}✗ Docker no está instalado.${NC}"
|
err "Docker no esta instalado. Instala Docker Desktop o docker-ce."
|
||||||
echo ""
|
err "https://docs.docker.com/get-docker/"
|
||||||
echo "Instálalo primero:"
|
|
||||||
echo " Linux: curl -fsSL https://get.docker.com | sh"
|
|
||||||
echo " macOS: https://docs.docker.com/desktop/install/mac-install/"
|
|
||||||
echo " Windows: https://docs.docker.com/desktop/install/windows-install/"
|
|
||||||
echo ""
|
|
||||||
echo "Y vuelve a ejecutar este script."
|
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! docker compose version &>/dev/null; then
|
if ! docker info >/dev/null 2>&1; then
|
||||||
echo -e "${RED}✗ Docker Compose v2 no está disponible.${NC}"
|
err "Docker daemon no responde. Inicia Docker Desktop o el servicio."
|
||||||
echo "Actualiza Docker: https://docs.docker.com/compose/install/"
|
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -e "${GREEN}✓${NC} Docker encontrado: $(docker compose version --short 2>/dev/null || echo 'OK')"
|
if ! docker compose version >/dev/null 2>&1; then
|
||||||
|
err "Docker Compose v2 no esta disponible. Actualiza Docker."
|
||||||
# ── 2. Comprobar RAM ────────────────────────
|
|
||||||
echo -e "${YELLOW}[2/4]${NC} Comprobando memoria..."
|
|
||||||
|
|
||||||
TOTAL_RAM_KB=$(grep MemTotal /proc/meminfo 2>/dev/null | awk '{print $2}' || echo "0")
|
|
||||||
TOTAL_RAM_GB=$((TOTAL_RAM_KB / 1024 / 1024))
|
|
||||||
|
|
||||||
if [ "$TOTAL_RAM_GB" -lt 6 ]; then
|
|
||||||
echo -e "${RED}✗ Se necesitan al menos 8 GB de RAM (detectado: ${TOTAL_RAM_GB} GB).${NC}"
|
|
||||||
echo "El modelo de IA necesita memoria para funcionar."
|
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -e "${GREEN}✓${NC} RAM: ${TOTAL_RAM_GB} GB"
|
# --- Config ------------------------------------------------------------------
|
||||||
|
|
||||||
# ── 3. Descargar y arrancar ─────────────────
|
if [ ! -f .env ]; then
|
||||||
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
warn "No existe .env, copiando .env.example"
|
||||||
COMPOSE_FILE="$SCRIPT_DIR/docker-compose.yml"
|
cp .env.example .env
|
||||||
|
info "Edita .env si quieres cambiar puertos o el modelo por defecto."
|
||||||
if [ ! -f "$COMPOSE_FILE" ]; then
|
|
||||||
echo -e "${RED}✗ No encuentro docker-compose.yml junto a este script.${NC}"
|
|
||||||
echo "Asegúrate de ejecutarlo desde la carpeta quickstart/."
|
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -e "${YELLOW}[3/4]${NC} Descargando contenedores (primera vez tarda 2-3 minutos)..."
|
# Carga .env sin requerir bash 4+ (compatible con macOS)
|
||||||
docker compose -f "$COMPOSE_FILE" up -d
|
set -a
|
||||||
|
# shellcheck disable=SC1091
|
||||||
|
. ./.env
|
||||||
|
set +a
|
||||||
|
|
||||||
# ── 4. Descargar modelo ─────────────────────
|
WEBUI_PORT="${WEBUI_PORT:-3000}"
|
||||||
echo -e "${YELLOW}[4/4]${NC} Descargando modelo de IA (llama3.2:3b, ~2 GB)..."
|
DEFAULT_MODEL="${DEFAULT_MODEL:-llama3.2:3b}"
|
||||||
echo " Esto también solo ocurre la primera vez."
|
|
||||||
|
|
||||||
# Esperar a que Ollama responda
|
# --- Memoria del sistema (Linux + macOS) -------------------------------------
|
||||||
echo " Esperando a que Ollama arranque..."
|
|
||||||
MAX_WAIT=60
|
total_ram_gb() {
|
||||||
WAITED=0
|
case "$(uname -s)" in
|
||||||
until docker exec d0a1-ollama ollama ps &>/dev/null; do
|
Linux)
|
||||||
|
awk '/MemTotal/ {printf "%d\n", $2/1024/1024}' /proc/meminfo
|
||||||
|
;;
|
||||||
|
Darwin)
|
||||||
|
sysctl -n hw.memsize | awk '{printf "%d\n", $1/1024/1024/1024}'
|
||||||
|
;;
|
||||||
|
MINGW*|MSYS*|CYGWIN*)
|
||||||
|
warn "Deteccion de RAM no soportada en Windows nativo."
|
||||||
|
warn "Usa WSL2 o asume 8 GB como baseline seguro."
|
||||||
|
echo "0"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "0"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
RAM_GB=$(total_ram_gb)
|
||||||
|
|
||||||
|
# --- Arranque ----------------------------------------------------------------
|
||||||
|
|
||||||
|
info "Levantando servicios (esto puede tardar unos segundos)..."
|
||||||
|
docker compose up -d
|
||||||
|
|
||||||
|
info "Esperando a que Ollama este listo..."
|
||||||
|
TIMEOUT=60
|
||||||
|
ELAPSED=0
|
||||||
|
until docker exec d0a1-ollama ollama list >/dev/null 2>&1; do
|
||||||
sleep 2
|
sleep 2
|
||||||
WAITED=$((WAITED + 2))
|
ELAPSED=$((ELAPSED + 2))
|
||||||
if [ "$WAITED" -ge "$MAX_WAIT" ]; then
|
if [ "$ELAPSED" -ge "$TIMEOUT" ]; then
|
||||||
echo -e "${RED}✗ Ollama no arrancó en ${MAX_WAIT}s. Revisa los logs:${NC}"
|
err "Ollama no arranco en ${TIMEOUT}s. Revisa 'docker compose logs ollama'."
|
||||||
echo " docker logs d0a1-ollama"
|
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
docker exec d0a1-ollama ollama pull llama3.2:3b
|
# grep -qF hace match literal (sin regex), evitando que un punto en el
|
||||||
|
# nombre del modelo (p.ej. qwen2.5:7b) actue como wildcard.
|
||||||
|
# --- Modelo por defecto ------------------------------------------------------
|
||||||
|
|
||||||
# ── Listo ────────────────────────────────────
|
if ! docker exec d0a1-ollama ollama list | grep -qF -- "$DEFAULT_MODEL"; then
|
||||||
echo ""
|
info "Descargando modelo por defecto: $DEFAULT_MODEL"
|
||||||
echo -e "${BOLD}${GREEN}¡Listo! Tu IA local está corriendo.${NC}"
|
if [ "$RAM_GB" -gt 0 ] && [ "$RAM_GB" -lt 8 ]; then
|
||||||
echo ""
|
warn "Detectados ${RAM_GB} GB de RAM. Para este modelo se recomiendan 8 GB."
|
||||||
echo -e " ${BOLD}Abre tu navegador:${NC} ${CYAN}http://localhost:3000${NC}"
|
warn "Si falla la carga, prueba con 'docker exec d0a1-ollama ollama pull llama3.2:1b'."
|
||||||
echo ""
|
fi
|
||||||
echo " No necesitas cuenta ni API key. Empieza a chatear."
|
docker exec d0a1-ollama ollama pull "$DEFAULT_MODEL"
|
||||||
echo ""
|
else
|
||||||
echo -e " ${BOLD}Modelos adicionales (opcionales):${NC}"
|
info "Modelo $DEFAULT_MODEL ya esta descargado."
|
||||||
echo " docker exec d0a1-ollama ollama pull qwen2.5:7b # Mejor en español (5 GB RAM)"
|
fi
|
||||||
echo " docker exec d0a1-ollama ollama pull llama3.1:8b # Más calidad (6 GB RAM)"
|
|
||||||
echo " docker exec d0a1-ollama ollama pull codellama:7b # Para código (5 GB RAM)"
|
# --- Resultado ---------------------------------------------------------------
|
||||||
echo ""
|
|
||||||
echo -e " ${BOLD}Comandos útiles:${NC}"
|
printf "\n"
|
||||||
echo " docker compose -f $COMPOSE_FILE logs -f # Ver logs"
|
info "d0a1 quickstart listo!"
|
||||||
echo " docker compose -f $COMPOSE_FILE down # Parar todo"
|
printf "\n"
|
||||||
echo " docker compose -f $COMPOSE_FILE down -v # Borrar todo (incluidos datos)"
|
printf " %bOpen WebUI:%b http://localhost:%s\n" "$BOLD" "$RESET" "$WEBUI_PORT"
|
||||||
echo ""
|
printf " %bOllama:%b http://localhost:%s\n" "$BOLD" "$RESET" "${OLLAMA_PORT:-11434}"
|
||||||
echo -e " ${BOLD}¿Quieres más?${NC} Despliega el stack completo en un VPS:"
|
printf "\n"
|
||||||
echo " ${CYAN}https://d0a1.es/vps${NC}"
|
info "Comandos utiles:"
|
||||||
echo ""
|
printf " docker compose logs -f # logs en tiempo real\n"
|
||||||
echo -e "${BOLD}${CYAN}═══════════════════════════════════════════${NC}"
|
printf " docker compose down # parar todo\n"
|
||||||
|
printf " docker exec d0a1-ollama ollama pull <modelo> # anadir modelos\n"
|
||||||
|
printf "\n"
|
||||||
|
|||||||
@@ -1,56 +1,48 @@
|
|||||||
# d0a1 quickstart — IA agéntica local, sin coste, sin VPS
|
|
||||||
# Ejecuta: ./deploy.sh
|
|
||||||
# Abre: http://localhost:3000
|
|
||||||
#
|
|
||||||
# Requisitos: Docker + 8 GB RAM mínimo
|
|
||||||
# Incluye: Ollama (LLM local) + Open WebUI (interfaz web)
|
|
||||||
# Modelo por defecto: llama3.2:3b (~2 GB, corre en 8 GB RAM)
|
|
||||||
services:
|
services:
|
||||||
ollama:
|
ollama:
|
||||||
|
# Pin a version estable conocida. Cambiar junto con .env.example / README.
|
||||||
|
image: ollama/ollama:0.11.4
|
||||||
container_name: d0a1-ollama
|
container_name: d0a1-ollama
|
||||||
image: ollama/ollama:0.30.8
|
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:11434:11434"
|
- "${OLLAMA_PORT:-11434}:11434"
|
||||||
volumes:
|
volumes:
|
||||||
- ollama_data:/root/.ollama
|
- ollama_data:/root/.ollama
|
||||||
environment:
|
environment:
|
||||||
OLLAMA_HOST: "0.0.0.0"
|
- OLLAMA_KEEP_ALIVE=${OLLAMA_KEEP_ALIVE:-5m}
|
||||||
OLLAMA_KEEP_ALIVE: "5m"
|
|
||||||
OLLAMA_NUM_PARALLEL: "1"
|
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "ollama", "ps"]
|
test: ["CMD", "ollama", "list"]
|
||||||
interval: 15s
|
interval: 10s
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 10
|
retries: 12
|
||||||
start_period: 30s
|
start_period: 20s
|
||||||
|
# GPU passthrough: descomenta la seccion deploy si tienes GPU NVIDIA.
|
||||||
|
# deploy:
|
||||||
|
# resources:
|
||||||
|
# reservations:
|
||||||
|
# devices:
|
||||||
|
# - driver: nvidia
|
||||||
|
# count: all
|
||||||
|
# capabilities: [gpu]
|
||||||
|
|
||||||
openwebui:
|
open-webui:
|
||||||
container_name: d0a1-openwebui
|
# Pin a version estable. La imagen :main se rompe sin aviso.
|
||||||
image: ghcr.io/open-webui/open-webui:0.9.6
|
image: ghcr.io/open-webui/open-webui:0.6.18
|
||||||
|
container_name: d0a1-open-webui
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
ports:
|
||||||
- "3000:8080"
|
- "${WEBUI_PORT:-3000}:8080"
|
||||||
volumes:
|
volumes:
|
||||||
- openwebui_data:/app/backend/data
|
- open_webui_data:/app/backend/data
|
||||||
environment:
|
environment:
|
||||||
OLLAMA_BASE_URL: "http://ollama:11434"
|
- OLLAMA_BASE_URL=http://ollama:11434
|
||||||
WEBUI_NAME: "d0a1 quickstart"
|
- WEBUI_AUTH=${WEBUI_AUTH:-true}
|
||||||
WEBUI_AUTH: "false"
|
- WEBUI_SECRET_KEY=${WEBUI_SECRET_KEY:-}
|
||||||
DEFAULT_LOCALE: "es"
|
- DEFAULT_MODELS=${DEFAULT_MODEL:-llama3.2:3b}
|
||||||
ENABLE_SIGNUP: "true"
|
|
||||||
ENABLE_WEB_SEARCH: "false"
|
|
||||||
ENABLE_DIRECT_CONNECTIONS: "false"
|
|
||||||
depends_on:
|
depends_on:
|
||||||
ollama:
|
ollama:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
deploy:
|
|
||||||
resources:
|
|
||||||
limits:
|
|
||||||
memory: 2G
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
ollama_data:
|
ollama_data:
|
||||||
driver: local
|
open_webui_data:
|
||||||
openwebui_data:
|
|
||||||
driver: local
|
|
||||||
|
|||||||
Confirmed clean: the new wording
Mantener en true.removes the misleading inlineWEBUI_AUTH=${...true}reference. The real default still comes fromdocker-compose.ymlvia${WEBUI_AUTH:-true}so the empty value in.env.exampleis intentional and correct. No further action needed in this file.Confirmed clean: the new wording
Mantener en true.removes the misleading inlineWEBUI_AUTH=${...true}reference. The real default still comes fromdocker-compose.ymlvia${WEBUI_AUTH:-true}so the empty value in.env.exampleis intentional and correct. No further action needed in this file.