learning_ai_notes/docker-compose.override.yml
saravanakumardb1 b23a601431 fix(docker): apply Phase D.2 Dockerfile/compose fixes
Mechanical fixes per docker-build-optimization-roadmap.md §6.D.2:

- Dockerfile: add # syntax=docker/dockerfile:1.7 directive (A2)
- Dockerfile: declare ARG GITEA_NPM_OWNER alongside GITEA_NPM_HOST (F14)
- Dockerfile: wildcard COPY .docker-deps* (A5-2, B3)
- Dockerfile (web): glob enumerated config COPYs (F11/F13) where applicable
- docker-compose.yml: healthcheck localhost → 127.0.0.1 (F12) where applicable
- docker-compose.yml: pass GITEA_NPM_OWNER build arg (F14) where applicable
- .npmrc.docker: rewrite with canonical ${GITEA_NPM_HOST}/${GITEA_NPM_OWNER}
  template (F4/F14) if hardcoded
- .gitignore: ensure *.bak rule (B3)
- .docker-deps/.gitkeep: ensure exists for wildcard COPY

Verified: docker-doctor exits PASS (warnings only, ADR-0001 expected).

Refs: docker-build-optimization-roadmap.md §Phase D.2
2026-05-27 04:12:19 -07:00

52 lines
2.1 KiB
YAML

# Local override for `docker compose up` on this host.
#
# Why this exists:
# docker-compose.yml maps the web container to host port 3000, but
# port 3000 on this host is already occupied (Grafana). This file
# remaps web to host port 3050 and backend stays on 4016. The backend
# is configured to point at the sibling platform/extraction/mcp
# services already running on the host network.
#
# Bring up:
# docker compose up -d
# URLs:
# Web: http://127.0.0.1:3050
# Backend: http://127.0.0.1:4016
# Health: http://127.0.0.1:4016/health
# Bring down:
# docker compose down
services:
backend:
extra_hosts:
- "host.docker.internal:host-gateway"
environment:
CORS_ORIGIN: "http://127.0.0.1:3050"
PLATFORM_SERVICE_URL: "http://host.docker.internal:4003"
EXTRACTION_SERVICE_URL: "http://host.docker.internal:4005"
MCP_SERVER_URL: "http://host.docker.internal:4007"
DB_PROVIDER: memory
# MUST match the JWT_SECRET used by the sibling platform-service so
# tokens platform issues are accepted by NoteLett backend. The
# platform-service in this dev compose stack uses the value below.
JWT_SECRET: "dev-ecosystem-secret-do-not-use-in-production"
web:
ports: !override
- "3050:3045"
# NEXT_PUBLIC_* values are baked into the Next.js bundle at build
# time. They MUST be set as build args so `pnpm run build` inside
# the Dockerfile picks them up. Runtime `environment:` alone has no
# effect on the already-bundled client code.
build:
args:
NEXT_PUBLIC_NOTES_API_URL: "http://127.0.0.1:4016/api"
NEXT_PUBLIC_PLATFORM_SERVICE_URL: "http://127.0.0.1:4003/api"
NEXT_PUBLIC_EXTRACTION_SERVICE_URL: "http://127.0.0.1:4005"
NEXT_PUBLIC_MCP_SERVER_URL: "http://127.0.0.1:4007/api"
environment:
NEXT_PUBLIC_NOTES_API_URL: "http://127.0.0.1:4016/api"
NEXT_PUBLIC_PLATFORM_SERVICE_URL: "http://127.0.0.1:4003/api"
NEXT_PUBLIC_EXTRACTION_SERVICE_URL: "http://127.0.0.1:4005"
NEXT_PUBLIC_MCP_SERVER_URL: "http://127.0.0.1:4007/api"