docker-compose.yml•1.41 kB
version: '3.8'
services:
app:
build:
context: .
dockerfile: Dockerfile
ports:
- "1337:1337"
environment:
- NODE_ENV=production
- DATABASE_URL=postgresql://postgres:postgres@postgres:5432/docmcp
- PORT=1337
- LOG_LEVEL=debug
- CORS_ORIGIN=*
depends_on:
postgres:
condition: service_healthy
volumes:
- ./logs:/app/logs
- app_data:/app/data
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "5"
healthcheck:
test: ["CMD", "/app/healthcheck.sh"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
restart: unless-stopped
postgres:
image: ankane/pgvector:latest
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: docmcp
ports:
- "5433:5432" # Using 5433 to avoid conflict with existing PostgreSQL
volumes:
- postgres_data:/var/lib/postgresql/data
- ./init-scripts:/docker-entrypoint-initdb.d
logging:
driver: "json-file"
options:
max-size: "50m"
max-file: "3"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
restart: unless-stopped
volumes:
postgres_data:
driver: local
app_data:
driver: local