services: postgres: image: pgvector/pgvector:pg16 container_name: outpost-postgres ports: - '5432:5432' environment: POSTGRES_USER: outpost POSTGRES_PASSWORD: outpost POSTGRES_DB: outpost volumes: - postgres_data:/var/lib/postgresql/data # Creates the extra `pathfinder` database on first init (fresh volume only) - ./scripts/db-init:/docker-entrypoint-initdb.d:ro healthcheck: test: ['CMD-SHELL', 'pg_isready -U outpost'] interval: 5s timeout: 5s retries: 5 # Local SMTP sink: SMTP on 1025, web UI and API on 8025. The web service sends # through it (SMTP_HOST below), so local email, including apps/web/e2e, takes the # real sendEmail -> SMTP path instead of the console fallback. mailpit: image: axllent/mailpit:latest container_name: outpost-mailpit ports: - '1025:1025' - '8025:8025' pathfinder: image: ghcr.io/copilotkit/pathfinder:latest container_name: outpost-pathfinder ports: - '8787:8787' environment: PORT: 8787 DATABASE_URL: postgresql://outpost:outpost@postgres:5432/pathfinder # Bundled CopilotKit docs KB (OpenAI text-embedding-3-small) PATHFINDER_CONFIG: /app/copilotkit-docs.yaml # Embeddings key — set OPENAI_API_KEY in .env (compose auto-loads it) OPENAI_API_KEY: ${OPENAI_API_KEY:-} depends_on: postgres: condition: service_healthy web: build: context: . dockerfile: apps/web/Dockerfile # NEXT_PUBLIC_* must be passed as a BUILD arg, not runtime environment — Next # inlines it into the client bundle during `next build`, so the `environment:` # entry below has no effect on what the browser receives. # No `:-credentials` default here on purpose: that would put the default in a # second place that can drift from the app's own fallback. An empty value is # treated as not-configured by both login/page.tsx and lib/auth.ts. args: NEXT_PUBLIC_AUTH_PROVIDER: ${NEXT_PUBLIC_AUTH_PROVIDER:-} container_name: outpost-web ports: - '3000:3000' environment: DATABASE_URL: postgresql://outpost:outpost@postgres:5432/outpost NEXTAUTH_SECRET: local-dev-secret-change-in-production NEXTAUTH_URL: http://localhost:3000 AUTH_PROVIDER: credentials NEXT_PUBLIC_AUTH_PROVIDER: credentials NODE_ENV: production PORT: 3000 SMTP_HOST: mailpit SMTP_PORT: 1025 depends_on: postgres: condition: service_healthy mailpit: condition: service_started restart: unless-stopped volumes: postgres_data: