Database Hosting Options
Kubernetes Deployments
CDviz database can be deployed on Kubernetes using several mature operators:
- Cloud Native Postgres (CNPG) - The officially recommended solution, also used in our demonstration cluster. Documentation | Reference configuration
- Postgres Operator by Zalando - A production-grade Postgres operator with high availability features. Documentation
- StackGres - Enterprise-grade PostgreSQL operator with monitoring capabilities. Documentation
Managed Database Services
The following managed database services have been evaluated for compatibility with CDviz requirements, particularly regarding support for the required PostgreSQL extensions.
Specialized PostgreSQL Providers
- TimescaleDB Cloud - Optimized for time-series data with built-in support for the TimescaleDB extension. Documentation
- Supabase - Open source Firebase alternative with comprehensive PostgreSQL extension support. Extension list
- Neon - Serverless PostgreSQL with advanced extension capabilities. Extension documentation
General Cloud Provider Services
Compatibility status with major cloud providers:
| Provider | Status | Documentation |
|---|---|---|
| Azure Database for PostgreSQL | ✅ Compatible | Extensions documentation |
| AWS RDS | ❌ Missing required extensions | Extensions list |
| Google Cloud SQL | ❌ Missing required extensions | Extensions documentation |
| Digital Ocean | ✅ Compatible | Extensions documentation |
| Scaleway | ✅ Compatible | Extensions documentation |
Container Deployments
For development, testing, and demonstration purposes, the CDviz database can be deployed using Docker or other OCI-compatible container runtimes.
A reference docker-compose configuration is available in the repository:
Docker Compose Configuration
yaml
postgres:
image: timescale/timescaledb-ha:pg18
# restart: always
# platform: linux/amd64
shm_size: 128mb
environment:
POSTGRES_USER: cdviz
POSTGRES_PASSWORD: postgres-password
POSTGRES_DB: cdviz
healthcheck:
test: pg_isready -U cdviz -d cdviz
interval: 10s
timeout: 5s
retries: 5
# network_mode: host
ports:
- "5432:5432"
# user: "${MY_UID:-1000}:${MY_GID:-1000}"
# volumes:
# # In this example, we share the folder `db-data` in our root repository, with the default PostgreSQL data path
# # It means that every time the repository is modifying the data inside
# # of `/var/lib/postgresql/data/`, automatically the change will appear in `db-data`
# # You don't need to create the `db-data` folder. Docker Compose will do it for you
# - ./tmp/postgres/data:/var/lib/postgresql/data
# # In this example, we share an init.sql script with the container
# # The init script will be executed when the database is first run
# - ./init.sql:/docker-entrypoint-initdb.d/init.sql
cdviz-db-migrate:
image: ghcr.io/cdviz-dev/cdviz-db-migration:latest
command:
- -database
- postgres://cdviz:postgres-password@postgres:5432/cdviz?sslmode=disable
- -path
- /migrations/
- up
# network_mode: host
depends_on:
postgres:
condition: service_healthy