Docker Compose dev infrastructure: PostgreSQL, Redis, ChromaDB with health checks and env helpers
Project description
bloque-docker-dev
Docker Compose dev infrastructure for the Bloques ecosystem. Provides PostgreSQL 16, Redis 7, and ChromaDB with health-check utilities and environment helpers.
This is NOT app containerization. For production Docker, see
bloque-docker-prod.
Services
| Service | Image | Default Port | Profile |
|---|---|---|---|
| PostgreSQL 16 | postgres:16-alpine |
5432 | core, ai |
| Redis 7 | redis:7-alpine |
6379 | core, ai |
| ChromaDB | chromadb/chroma:latest |
8000 | ai |
Quick Start
# Start core services (PostgreSQL + Redis)
docker compose -f packages/python/bloque-docker-dev/docker-compose.yml --profile core up -d
# Start all services including ChromaDB
docker compose -f packages/python/bloque-docker-dev/docker-compose.yml --profile ai up -d
# Stop everything
docker compose -f packages/python/bloque-docker-dev/docker-compose.yml --profile ai down
Environment Defaults
Copy .env.example to .env and adjust as needed. All values have sensible defaults for local development.
Python API
Load environment variables
from bloque_docker_dev.env import load_dev_env
# Sets DATABASE_URL, REDIS_URL, CHROMADB_URL if not already set
defaults = load_dev_env()
print(defaults.postgres_url)
Health checks
import asyncio
from bloque_docker_dev.health import check_services, wait_for_services
# One-shot check
status = asyncio.run(check_services())
# {"postgres": True, "redis": True, "chromadb": False}
# Wait until all services are ready (raises TimeoutError if not)
status = asyncio.run(wait_for_services(max_wait=30.0))
Init SQL
The initdb/ directory contains SQL scripts that run on first PostgreSQL start:
01-extensions.sql- Installs pgcrypto and uuid-ossp extensions02-rls-example.sql- Example RLS setup matchingulfblk-multitenantpatterns
Volumes
Uses named volumes (not bind mounts) to avoid Windows/WSL permission issues:
pgdata- PostgreSQL dataredisdata- Redis AOF persistencechromadata- ChromaDB collections
Dependencies
ulfblk-core(required)httpx(HTTP health checks for ChromaDB)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ulfblk_docker_dev-0.1.0.tar.gz.
File metadata
- Download URL: ulfblk_docker_dev-0.1.0.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
92d0ba0d58dd4f9684cf2719d8511d56bd766b8c9a95f754040935692cda8802
|
|
| MD5 |
3968168ac470a82967832340ab9e6347
|
|
| BLAKE2b-256 |
04227eb865fd9cff6e2e93fa49a29b1de5f2b60434281c3f660321f9e84da519
|
File details
Details for the file ulfblk_docker_dev-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ulfblk_docker_dev-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
855d6aebb5edd025631f9d1a9d78be491135de6e0b0e8a84b8583ec4e045a793
|
|
| MD5 |
aa51ad52d1d1ecc8db1afd85a5b68433
|
|
| BLAKE2b-256 |
0d2c59c54bbfd1ecfefc7ef2b42daabbb3d8053fbce92b68d1858ddf59799429
|