Tools Reference

Tools: Deployment

Deployment tools prepare your zeebpy project for production by generating Docker infrastructure, requirements files, and running production-readiness checks.


zeeb_generate_dockerfile

Generate a production-ready Dockerfile for the project.

zeeb_generate_dockerfile(project_id) → str

Writes a Dockerfile to the project root. The generated file:

  • Uses a slim Python base image
  • Copies dependencies and installs them
  • Copies the project source
  • Exposes port 8000
  • Sets CMD to run the zeebpy server with Gunicorn

Example prompt: "Generate a Dockerfile for my project"


zeeb_generate_requirements

Generate or update the requirements.txt file based on the project's current dependencies.

zeeb_generate_requirements(project_id) → str

Inspects installed packages and used imports to produce an accurate requirements.txt.


zeeb_check_production_readiness

Run a production-readiness checklist on the project.

zeeb_check_production_readiness(project_id) → str

Checks and reports on:

CheckDescription
DEBUG settingShould be False in production
SECRET_KEYShould be set from environment variable
ALLOWED_HOSTSShould be explicitly set
DATABASE_URLShould be set from environment
CORSShould have explicit origins, not wildcards
Pending migrationsAll migrations should be applied
Health endpointA /health endpoint should be present
Requirements filerequirements.txt should exist
DockerfileDockerfile should exist

Returns: Pass/fail for each check with fix suggestions.


zeeb_export_openapi

Export the project's current OpenAPI schema as JSON.

zeeb_export_openapi(project_id) → str

Returns: Full OpenAPI 3.x JSON schema. Useful for sharing with frontend teams or API consumers.


zeeb_configure_cors

Configure CORS settings for the project.

zeeb_configure_cors(allow_origins: list[str], allow_methods?: list[str], allow_credentials?: bool, project_id) → str

Arguments:

NameTypeDescription
allow_originslist[str]Allowed origin URLs (e.g. ["https://myapp.com"])
allow_methodslist[str]?Allowed HTTP methods (default: GET, POST, PUT, DELETE, OPTIONS)
allow_credentialsbool?Whether to allow credentials (default: false)
project_idstringUUID of the target project

Use ["*"] for development only. In production, always specify explicit origins.


zeeb_get_cors_config

Read the current CORS configuration.

zeeb_get_cors_config(project_id) → str

zeeb_run_management_command

Run an arbitrary management command inside the project.

zeeb_run_management_command(command: str, project_id) → str

Arguments:

NameTypeDescription
commandstringManagement command (e.g. collectstatic, seed blog)
project_idstringUUID of the target project

Notes

  • Always run zeeb_check_production_readiness before deploying to production.
  • The generated Dockerfile works with any container registry (Docker Hub, ECR, GCR, etc.).
  • Preview environments run automatically — they are not the same as a production deployment.