From 395603490c9cb25f74002917b53658f61c00cdff Mon Sep 17 00:00:00 2001 From: Renato Rosa Date: Wed, 19 Aug 2026 20:23:52 -0300 Subject: [PATCH] Atualizar README.md --- README.md | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/README.md b/README.md index e7e5386..c2f914a 100644 --- a/README.md +++ b/README.md @@ -33,3 +33,63 @@ Tudo isso dentro de uma **única conversa**, sem abas, com modos adaptativos: - cron jobs para monitoramento contínuo --- + +# Ollama Gateway – safira.renatorosa.com + +This project provides a simple HTTP gateway to a local Ollama instance, +exposing multiple models (Llama 3.2, Gemma 4, and Qwen 2.5) through a +Flask API served by Gunicorn inside Docker. The service is reachable +over HTTP on port 80 at: + +**https://safira.renatorosa.com** + +Authentication is handled via Google OAuth. + +## Overview + +- **Backend:** Python (Flask) + Gunicorn +- **Models:** Llama 3.2, Gemma 4, Qwen 2.5 +- **Hardware target:** Nvidia RTX 2070M GPU + 16 GB RAM +- **Auth:** Google OAuth 2.0 +- **Runtime:** Docker + Docker Compose +- **Port:** 80 (HTTP) + +Both the gateway and Ollama run inside the same `docker compose` file. + +## Environment variables + +Create a `.env` file: + +``` +GOOGLE_CLIENT_ID=your-google-client-id +GOOGLE_CLIENT_SECRET=your-google-client-secret +GOOGLE_REDIRECT_URI=https://.../oauth/callback +FLASK_SECRET_KEY=change-this-secret +OLLAMA_BASE_URL=http://ollama:11434 +``` + +## Running + +docker compose up --build + +### Access: + +https://... + +## API + +### POST /api/generate + +```json +{ + "model": "llama3.2", + "prompt": "Explain quantum computing simply." +} +Response: + +json +{ + "model": "llama3.2", + "output": "..." +} +License \ No newline at end of file