Files
noteflow/compose.yaml
Travis Vasceannie 95d1a98cc2 refactor: simplify Docker Compose configuration and add spacy dependency
- Changed server port binding from explicit `0.0.0.0:50051:50051` to `50051:50051` for standard Docker port mapping
- Commented out unused `server-full` and `client-dev` service definitions to reduce configuration complexity
- Added `spacy>=3.8.11` to project dependencies
2026-01-03 02:28:58 -05:00

202 lines
5.2 KiB
YAML

services:
# =============================================================================
# Infrastructure Services
# =============================================================================
db:
container_name: noteflow-postgres
image: pgvector/pgvector:pg15
restart: unless-stopped
environment:
POSTGRES_DB: ${POSTGRES_DB:-noteflow}
POSTGRES_USER: ${POSTGRES_USER:-noteflow}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-noteflow}
volumes:
- noteflow_pg_data:/var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-noteflow} -d ${POSTGRES_DB:-noteflow}"]
interval: 5s
timeout: 5s
retries: 10
networks:
- noteflow-net
profiles:
- infra
- server
- full
- server-full
redis:
container_name: noteflow-redis
image: redis:7-alpine
restart: unless-stopped
ports:
- "6379:6379"
volumes:
- noteflow_redis_data:/data
command: redis-server --appendonly yes
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 10
networks:
- noteflow-net
profiles:
- infra
- server
- full
- server-full
qdrant:
container_name: noteflow-qdrant
image: qdrant/qdrant:v1.12.1
restart: unless-stopped
ports:
- "6333:6333"
- "6334:6334"
volumes:
- noteflow_qdrant_data:/qdrant/storage
environment:
QDRANT__SERVICE__GRPC_PORT: 6334
healthcheck:
test: ["CMD-SHELL", "bash -c '</dev/tcp/localhost/6333'"]
interval: 5s
timeout: 3s
retries: 10
start_period: 10s
networks:
- noteflow-net
profiles:
- infra
- server
- full
- server-full
# =============================================================================
# Application Services
# =============================================================================
# Note: 'server' and 'server-full' are mutually exclusive (same port 50051).
# Use profile 'server' OR 'server-full', not both.
server:
container_name: noteflow-server
build:
context: .
dockerfile: docker/server.Dockerfile
target: server
restart: unless-stopped
ports:
- "50051:50051"
extra_hosts:
- "host.docker.internal:host-gateway"
env_file:
- .env
environment:
NOTEFLOW_DATABASE_URL: postgresql+asyncpg://${POSTGRES_USER:-noteflow}:${POSTGRES_PASSWORD:-noteflow}@db:5432/${POSTGRES_DB:-noteflow}
NOTEFLOW_REDIS_URL: redis://redis:6379/0
NOTEFLOW_QDRANT_URL: http://qdrant:6333
NOTEFLOW_LOG_FORMAT: console
volumes:
- .:/workspace
- server_venv:/workspace/.venv
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
qdrant:
condition: service_healthy
networks:
- noteflow-net
profiles:
- server
- full
# server-full:
# container_name: noteflow-server-full
# build:
# context: .
# dockerfile: docker/server.Dockerfile
# target: server-full
# restart: unless-stopped
# ports:
# - "50051:50051"
# extra_hosts:
# - "host.docker.internal:host-gateway"
# env_file:
# - .env
# environment:
# NOTEFLOW_DATABASE_URL: postgresql+asyncpg://${POSTGRES_USER:-noteflow}:${POSTGRES_PASSWORD:-noteflow}@db:5432/${POSTGRES_DB:-noteflow}
# NOTEFLOW_REDIS_URL: redis://redis:6379/0
# NOTEFLOW_QDRANT_URL: http://qdrant:6333
# NOTEFLOW_LOG_FORMAT: console
# volumes:
# - .:/workspace
# - server_venv:/workspace/.venv
# depends_on:
# db:
# condition: service_healthy
# redis:
# condition: service_healthy
# qdrant:
# condition: service_healthy
# networks:
# - noteflow-net
# profiles:
# - server-full
# Tauri client dev container (for CI/containerized development)
# Note: Desktop apps typically run natively, not in Docker
# client-dev:
# container_name: noteflow-client-dev
# build:
# context: .
# dockerfile: docker/client.Dockerfile
# target: client-dev
# environment:
# NOTEFLOW_SERVER_HOST: server
# NOTEFLOW_SERVER_PORT: 50051
# DISPLAY: ${DISPLAY:-:0}
# volumes:
# - ./client:/app/client
# - /tmp/.X11-unix:/tmp/.X11-unix:ro
# - client_cargo_cache:/root/.cargo/registry
# - client_npm_cache:/root/.npm
# depends_on:
# - server
# networks:
# - noteflow-net
# profiles:
# - client
frontend:
image: node:20-alpine
working_dir: /app
ports:
- "5173:5173"
volumes:
- ./client:/app
command: sh -c "npm install -g npm@latest && npm install && npm update caniuse-lite browserslist || true && npm run dev"
environment:
- NODE_ENV=development
depends_on:
- server
networks:
- noteflow-net
profiles:
- frontend
- full
volumes:
noteflow_pg_data:
noteflow_redis_data:
noteflow_qdrant_data:
client_cargo_cache:
client_npm_cache:
server_venv:
networks:
noteflow-net:
driver: bridge