PTPureToolkit
DevOps仅本地运行

Local AI PostgreSQL Qdrant Docker Compose

Copy a ready-to-run Local AI App + PostgreSQL + Qdrant docker-compose.yml for local development. Includes .env.example, commands, and connection strings — no signup.

此工具在你的浏览器本地运行。你的输入不会被上传。

不上传无服务器日志无运行时 API浏览器内转换

Prefilled local output

Copy the generated result or open the full tool to adjust inputs locally.

Stack preset

Local AI App + PostgreSQL + Qdrant

docker-compose.yml

services:
  app:
    image: "python:3.12-slim"
    command: python app.py
    env_file:
      - .env
    ports:
      - "7860:7860"
    depends_on:
      - db
    volumes:
      - ".:/app"
    working_dir: /app
    networks:
      - app_network
  db:
    image: "postgres:16-alpine"
    environment:
      POSTGRES_DB: "${POSTGRES_DB}"
      POSTGRES_USER: "${POSTGRES_USER}"
      POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
    ports:
      - "5432:5432"
    volumes:
      - "postgres_data:/var/lib/postgresql/data"
    healthcheck:
      test:
        - CMD-SHELL
        - "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"
      interval: "10s"
      timeout: "5s"
      retries: 5
    networks:
      - app_network
  qdrant:
    image: "qdrant/qdrant:v1.11.0"
    ports:
      - "6333:6333"
    volumes:
      - "qdrant_data:/qdrant/storage"
    networks:
      - app_network
volumes:
  postgres_data: {}
  qdrant_data: {}
networks:
  app_network:
    driver: bridge


# .env.example
COMPOSE_PROJECT_NAME=local_ai
APP_PORT=7860
APP_ENV=development
APP_SECRET=change-me
POSTGRES_DB=app
POSTGRES_USER=app
POSTGRES_PASSWORD=change-me
DATABASE_URL=postgresql://app:change-me@db:5432/app
DATABASE_PORT=5432
QDRANT_URL=http://qdrant:6333


# Commands
cp .env.example .env
docker compose up -d --build
docker compose ps
docker compose logs -f app
docker compose exec app sh
docker compose down
docker compose down -v  # remove named volumes and local data

# Notes
PostgreSQL internal: postgresql://app:${POSTGRES_PASSWORD}@db:5432/app
PostgreSQL local: postgresql://app:${POSTGRES_PASSWORD}@localhost:${DATABASE_PORT}/app
Qdrant internal: http://qdrant:6333
Qdrant local: http://localhost:6333
Preset: Local AI App + PostgreSQL + Qdrant
Mode: development

Notes:
- Review image tags, commands, and mounted paths for your actual application layout.
- Secrets are represented as environment variables in .env.example; replace placeholder values before use.
- Healthchecks are included for supported infrastructure services.
- Named Docker volumes are enabled for local persistence.

示例

Local AI PostgreSQL Qdrant Docker Compose

Copy a ready-to-run Local AI App + PostgreSQL + Qdrant docker-compose.yml for local development. Includes .env.example, commands, and connection strings — no signup.

Local AI App + PostgreSQL + Qdrant

工作原理

  1. Local AI PostgreSQL Qdrant Docker Compose gives you a practical Compose baseline for AI prototypes that need metadata storage and vector search locally. It uses environment variables for secrets, named services for local networking, and readable service names so the generated file is easy to adapt.
  2. This preset is meant for developers who want to start from a working multi-service skeleton instead of writing YAML from scratch. The generated output includes docker-compose.yml, .env.example, common commands, and connection notes.
  3. Treat the result as infrastructure scaffolding. Before production, review image pinning, TLS termination, backup policy, resource limits, secret management, and whether database ports should be exposed outside the Compose network.

限制

  • 此预设面向常见工作流,生产使用前仍需结合你的运行环境复核。
  • 生成结果是确定性的本地输出,但 scheduler、日志格式或基础设施 dialect 可能存在差异。
  • 如果需要调整字段、端口、选项或样例输入,请使用完整父工具页面。

FAQ

Is this Local AI App + PostgreSQL + Qdrant Docker Compose file production-ready?

It is a strong starter, not a hardened production deployment. Review secrets, TLS, backups, resource limits, and network exposure before production use.

Does the builder store my stack configuration?

No. Preset generation is static and the interactive builder runs locally in the browser.

Can I download the generated Compose files?

Yes. The page exposes copyable and downloadable output for docker-compose.yml and related notes.

相关工具