Update README.md

This commit is contained in:
2026-05-19 23:33:07 +02:00
parent c58b65babb
commit bdb403812b
+53 -4
View File
@@ -59,9 +59,9 @@ Edit `.env.local`:
DATABASE_URL=postgresql://user:password@localhost:5432/loam DATABASE_URL=postgresql://user:password@localhost:5432/loam
JWT_SECRET=change-this-to-a-long-random-string-in-production JWT_SECRET=change-this-to-a-long-random-string-in-production
# Optional — defaults shown # Optional — recommended local model shown
OLLAMA_URL=http://localhost:11434 OLLAMA_URL=http://localhost:11434
OLLAMA_MODEL=llama3.1:8b OLLAMA_MODEL=qwen3:32b
``` ```
### 3. Set up the database ### 3. Set up the database
@@ -77,9 +77,11 @@ npm run db:seed
### 4. Pull an Ollama model (optional) ### 4. Pull an Ollama model (optional)
```bash ```bash
ollama pull llama3.1:8b ollama pull qwen3:32b
``` ```
`qwen3:32b` is the recommended local model for the recommendation endpoint on a 32GB VRAM GPU such as the AMD Radeon AI PRO R9700. Use `qwen3:14b` if you want faster responses or need a smaller memory footprint.
### 5. Run the dev server ### 5. Run the dev server
```bash ```bash
@@ -90,6 +92,53 @@ Open [http://localhost:3000](http://localhost:3000).
--- ---
## Docker
Build and run the web app plus PostgreSQL:
```bash
docker compose up --build
```
The app is exposed at [http://localhost:3333](http://localhost:3333). The Compose stack provides `DATABASE_URL` and `JWT_SECRET` for the app container.
The Docker image installs dependencies with `npm ci --ignore-scripts`; Prisma generation runs later in the builder stage after `prisma/schema.prisma` has been copied into the image. The base image also installs OpenSSL so Prisma's native query engine works on Alpine.
### Ollama in a Separate Container
The app expects Ollama at `OLLAMA_URL`. If Ollama runs in another container, expose port `11434` and point the app at that service or host address.
For an AMD GPU with ROCm, a typical Ollama container launch is:
```bash
docker run --rm -it \
--device=/dev/kfd \
--device=/dev/dri \
--group-add video \
--group-add render \
-v ollama:/root/.ollama \
-p 11434:11434 \
ollama/ollama:rocm
```
Then pull the recommended model:
```bash
ollama pull qwen3:32b
```
If the app runs in Docker Compose and Ollama is bound to the host on Linux, set:
```yaml
environment:
OLLAMA_URL: http://host.docker.internal:11434
OLLAMA_MODEL: qwen3:32b
extra_hosts:
- "host.docker.internal:host-gateway"
```
---
## Project structure ## Project structure
``` ```
@@ -225,4 +274,4 @@ Android commands are run from `android/`:
| `DATABASE_URL` | Yes | — | PostgreSQL connection string | | `DATABASE_URL` | Yes | — | PostgreSQL connection string |
| `JWT_SECRET` | Yes | — | Secret for signing session JWTs | | `JWT_SECRET` | Yes | — | Secret for signing session JWTs |
| `OLLAMA_URL` | No | `http://localhost:11434` | Ollama server base URL | | `OLLAMA_URL` | No | `http://localhost:11434` | Ollama server base URL |
| `OLLAMA_MODEL` | No | `llama3.1:8b` | Model name for recommendations | | `OLLAMA_MODEL` | No | `llama3.1:8b` | Model name for recommendations. `qwen3:32b` is recommended for a 32GB VRAM local GPU. |