This guide explains how to run the Memorizer application from your IDE (Rider, Visual Studio, VS Code) while running all dependencies in Docker containers.
-
Start dependencies (only needs to be done once):
docker-compose -f docker-compose.dev.yml up -d
-
Wait for initialization (first time only):
- PostgreSQL starts immediately
- Ollama downloads the embedding model (~100MB)
- Ollama downloads the LLM model (~300MB)
- Check progress:
docker-compose -f docker-compose.dev.yml logs -f ollama-init
-
Run the application from your IDE:
- Open
Memorizer.slnin your IDE - Set
Memorizeras the startup project - Press F5 (or your IDE's run/debug command)
- Application will start on
http://localhost:5000
- Open
The docker-compose.dev.yml file starts these services:
| Service | Port | Purpose | Access |
|---|---|---|---|
| PostgreSQL | 5432 | Vector database with pgvector | localhost:5432 |
| pgAdmin | 5050 | Database management UI | http://localhost:5050 |
| Ollama | 11434 | LLM and embedding service | localhost:11434 |
PostgreSQL:
- Host:
localhost - Port:
5432 - Database:
postgmem - Username:
postgres - Password:
postgres
pgAdmin:
- URL: http://localhost:5050
- Email:
admin@example.com - Password:
admin
The application is pre-configured via appsettings.json:
{
"ConnectionStrings": {
"Storage": "Host=localhost;Port=5432;Database=postgmem;Username=postgres;Password=postgres"
},
"Embeddings": {
"ApiUrl": "http://localhost:11434",
"Model": "all-minilm:33m-l12-v2-fp16"
},
"LLM": {
"ApiUrl": "http://localhost:11434",
"Model": "qwen2:0.5b"
}
}Check status:
docker-compose -f docker-compose.dev.yml psView logs:
# All services
docker-compose -f docker-compose.dev.yml logs -f
# Specific service
docker-compose -f docker-compose.dev.yml logs -f postgres
docker-compose -f docker-compose.dev.yml logs -f ollamaStop dependencies:
docker-compose -f docker-compose.dev.yml downStop and remove data volumes:
docker-compose -f docker-compose.dev.yml down -vRestart a specific service:
docker-compose -f docker-compose.dev.yml restart postgresPostgreSQL not ready:
# Check if PostgreSQL is healthy
docker-compose -f docker-compose.dev.yml ps postgres
# View PostgreSQL logs
docker-compose -f docker-compose.dev.yml logs postgresOllama models not loaded:
# Check model download status
docker-compose -f docker-compose.dev.yml logs ollama-init
# Manually trigger model download
docker exec -it memorizer-ollama-dev ollama pull all-minilm:33m-l12-v2-fp16
docker exec -it memorizer-ollama-dev ollama pull qwen2:0.5b
# List loaded models
docker exec -it memorizer-ollama-dev ollama listPort conflicts:
If ports 5432, 5050, or 11434 are already in use, you can modify the port mappings in docker-compose.dev.yml and update appsettings.json accordingly.
Integration tests require the same dependencies. Make sure docker-compose.dev.yml is running, then:
dotnet testIf you want to run everything (including the app) in Docker:
# Build and run full stack
docker-compose -f docker-compose.local.yml up --build
# Access at http://localhost:5000IDE → Docker:
- Stop your IDE debugger
- Build local image:
docker build -t memorizer:latest . - Start full stack:
docker-compose -f docker-compose.local.yml up
Docker → IDE:
- Stop full stack:
docker-compose -f docker-compose.local.yml down - Start dependencies only:
docker-compose -f docker-compose.dev.yml up -d - Run from IDE
- Start dependencies once:
docker-compose -f docker-compose.dev.yml up -d - Code changes → Save → Hot reload (if enabled) or restart debugger
- When done:
docker-compose -f docker-compose.dev.yml down
Dependencies persist across sessions, so you only need to start them once per machine restart.