Repository navigation
Expand file tree
/
Copy pathdocker-compose.local.yml
More file actions
53 lines (52 loc) · 2.33 KB
/
Copy pathdocker-compose.local.yml
File metadata and controls
53 lines (52 loc) · 2.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
services:
cloud-agent:
build:
context: .
dockerfile: cloud-agent/Dockerfile.dev
ports:
- "8080:8080"
volumes:
- ./shared:/app/shared
- /app/shared/node_modules
- ./cloud-agent/src:/app/cloud-agent/src
- ./cloud-agent/scripts:/app/cloud-agent/scripts
- /app/cloud-agent/node_modules
# Embeddings (cloud-agent/src/db/embeddings.ts) call Vertex AI via ADC, not an API key.
# Run `gcloud auth application-default login` on the host first.
- ${HOME}/.config/gcloud:/root/.config/gcloud:ro
environment:
- NODE_ENV=development
- MOCK_FIREBASE_AUTH=true
- GOOGLE_GENAI_USE_VERTEXAI=true
- GOOGLE_CLOUD_PROJECT=${GCP_PROJECT:?Set GCP_PROJECT to your Vertex AI-enabled GCP project (e.g. clanker-prod)}
- GOOGLE_CLOUD_LOCATION=global
- DATABASE_URL=postgres://clanker_dev:local_pass@postgres_db:5432/clanker
- CORS_ORIGIN=http://localhost:8081,http://localhost:8082
- CLOUD_AGENT_URL=http://localhost:8080
- SCHEDULER_SECRET=${SCHEDULER_SECRET:-}
# shared/node_modules is an anonymous volume (not the host dir) so these symlinks only
# affect the container; shared/*.ts imports (e.g. dsl-schema → zod) resolve via them.
# The volume is a mount point, so it can't be replaced by one symlink (`ln -sfn dir
# mountpoint` nests the link inside it); link each top-level package into it instead.
command: sh -c "ln -sfn /app/cloud-agent/node_modules/* /app/shared/node_modules/ && npm run dev"
depends_on:
postgres_db:
condition: service_healthy
postgres_db:
# Match production (Cloud SQL POSTGRES_18). Local was pg15 until 2026-08-01, two majors
# behind prod, so planner behaviour and catalog representation differed from what ships.
# Bumping the major is not an in-place upgrade: the PGDATA volume must be recreated
# (`docker compose -f docker-compose.local.yml rm -sfv postgres_db`), then re-run
# `cd functions && npm run migrate:dev` and the seedLocal step from docs/db-migrations.md.
image: pgvector/pgvector:pg18
environment:
- POSTGRES_USER=clanker_dev
- POSTGRES_PASSWORD=local_pass
- POSTGRES_DB=clanker
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U clanker_dev"]
interval: 5s
timeout: 5s
retries: 5