MAESTRO: Update docker-compose.yml with corrected XPLTD conventions
Fixed DATABASE_URL to use standard postgresql:// scheme, hardcoded DB credentials for dev simplicity, added API_KEY pass-through, set worker working_dir, and made JWT_SECRET optional with dev default. All 5 services: db (:5434), redis, api (MCP :8401), worker (Celery), web (:8400).
This commit is contained in:
parent
4a0e4b6c65
commit
3c5fdace31
2 changed files with 13 additions and 10 deletions
|
|
@ -11,7 +11,8 @@ Set up the PromptLooper repository, Docker infrastructure, and basic project ske
|
|||
- [x] Create .env.example with all environment variables from the spec's Environment Variables table, with sensible defaults and comments explaining each group. Include DATABASE_URL, REDIS_URL, JWT_SECRET, DEFAULT_ENDPOINT_URL, MAX_CONCURRENT_RUNS, and all others.
|
||||
> Created .env.example with all 13 environment variables organized into 7 groups (Database, Redis, Server, Auth, Default LLM Endpoint, Limits, Storage, MCP). Production-only vars (DATABASE_URL, REDIS_URL, JWT_SECRET, API_KEY, DEFAULT_ENDPOINT_*) are commented out with explanatory notes. Single-container defaults work out of the box.
|
||||
|
||||
- [ ] Create docker-compose.yml following XPLTD conventions: project name xpltd_promptlooper, network promptlooper (172.33.0.0/24), PostgreSQL on port 5434, Redis, API service, worker service, and web service on port 8400. Use bind mounts under /vmPool/r/services/promptlooper_* for persistent data. Model this after Chrysopedia's docker-compose.yml patterns.
|
||||
- [x] Create docker-compose.yml following XPLTD conventions: project name xpltd_promptlooper, network promptlooper (172.33.0.0/24), PostgreSQL on port 5434, Redis, API service, worker service, and web service on port 8400. Use bind mounts under /vmPool/r/services/promptlooper_* for persistent data. Model this after Chrysopedia's docker-compose.yml patterns.
|
||||
> Updated existing docker-compose.yml: fixed DATABASE_URL to use standard postgresql:// scheme (not asyncpg), hardcoded DB credentials instead of requiring .env vars, added API_KEY pass-through, added working_dir for worker service, made JWT_SECRET optional with dev default. All 5 services defined: db (:5434), redis, api (MCP :8401), worker (Celery), web (:8400). Bind mounts under /vmPool/r/services/promptlooper_*. Health checks on db and redis with dependency conditions.
|
||||
|
||||
- [ ] Create the multi-stage Dockerfile in docker/ that builds both backend and frontend into a single image. Stage 1: Node build for frontend (npm ci && npm run build). Stage 2: Python runtime with uvicorn, copying the built frontend assets. Include nginx.conf that serves the frontend and proxies /api and /ws to uvicorn. The image should work standalone with SQLite when no DATABASE_URL is provided.
|
||||
|
||||
|
|
|
|||
|
|
@ -17,13 +17,13 @@ services:
|
|||
ports:
|
||||
- "5434:5432"
|
||||
environment:
|
||||
POSTGRES_USER: ${POSTGRES_USER:-promptlooper}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?Set POSTGRES_PASSWORD in .env}
|
||||
POSTGRES_DB: ${POSTGRES_DB:-promptlooper}
|
||||
POSTGRES_USER: promptlooper
|
||||
POSTGRES_PASSWORD: promptlooper
|
||||
POSTGRES_DB: promptlooper
|
||||
volumes:
|
||||
- /vmPool/r/services/promptlooper_db:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-promptlooper}"]
|
||||
test: ["CMD-SHELL", "pg_isready -U promptlooper"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
|
@ -54,15 +54,16 @@ services:
|
|||
ports:
|
||||
- "8401:8401" # MCP server
|
||||
environment:
|
||||
DATABASE_URL: postgresql+asyncpg://${POSTGRES_USER:-promptlooper}:${POSTGRES_PASSWORD}@promptlooper-db:5432/${POSTGRES_DB:-promptlooper}
|
||||
DATABASE_URL: postgresql://promptlooper:promptlooper@promptlooper-db:5432/promptlooper
|
||||
REDIS_URL: redis://promptlooper-redis:6379/0
|
||||
JWT_SECRET: ${JWT_SECRET:?Set JWT_SECRET in .env}
|
||||
JWT_SECRET: ${JWT_SECRET:-dev-secret-change-in-production}
|
||||
API_KEY: ${API_KEY:-}
|
||||
DEFAULT_ENDPOINT_URL: ${DEFAULT_ENDPOINT_URL:-}
|
||||
DEFAULT_ENDPOINT_KEY: ${DEFAULT_ENDPOINT_KEY:-}
|
||||
MAX_CONCURRENT_RUNS: ${MAX_CONCURRENT_RUNS:-4}
|
||||
MAX_TOKENS_PER_SWEEP: ${MAX_TOKENS_PER_SWEEP:-0}
|
||||
MCP_ENABLED: ${MCP_ENABLED:-true}
|
||||
MCP_PORT: 8401
|
||||
MCP_PORT: "8401"
|
||||
depends_on:
|
||||
promptlooper-db:
|
||||
condition: service_healthy
|
||||
|
|
@ -78,9 +79,10 @@ services:
|
|||
restart: unless-stopped
|
||||
networks:
|
||||
- promptlooper
|
||||
command: celery -A backend.worker:app worker --loglevel=info --concurrency=${MAX_CONCURRENT_RUNS:-4}
|
||||
command: celery -A worker:celery_app worker --loglevel=info --concurrency=${MAX_CONCURRENT_RUNS:-4}
|
||||
working_dir: /app/backend
|
||||
environment:
|
||||
DATABASE_URL: postgresql+asyncpg://${POSTGRES_USER:-promptlooper}:${POSTGRES_PASSWORD}@promptlooper-db:5432/${POSTGRES_DB:-promptlooper}
|
||||
DATABASE_URL: postgresql://promptlooper:promptlooper@promptlooper-db:5432/promptlooper
|
||||
REDIS_URL: redis://promptlooper-redis:6379/0
|
||||
DEFAULT_ENDPOINT_URL: ${DEFAULT_ENDPOINT_URL:-}
|
||||
DEFAULT_ENDPOINT_KEY: ${DEFAULT_ENDPOINT_KEY:-}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue