PostgreSQL
PostgreSQL is a powerful, open-source object-relational database system with over 35 years of active development.
Presentation
Production-ready PostgreSQL database via Docker Compose with persistent volumes, health checks, and connection pooling.
What create-faster adds
Beyond the official setup, we include:
Docker Compose Configuration:
- Pre-configured
postgres:latestservice - Project-specific naming (
postgres-{projectName}) - Persistent data volume
- Health check with
pg_isready - Connection limit (100 max connections)
- Dedicated network for isolation
File created:
docker.compose.yml # PostgreSQL service configurationService Configuration:
- Image:
postgres:latest - Container:
postgres-{projectName} - Port: 5432 (PostgreSQL default)
- Restart: always
Environment Variables:
POSTGRES_USER: postgresPOSTGRES_PASSWORD: password (change in production)POSTGRES_DB:postgres-{projectName}
Volume:
postgres-{projectName}-data:/var/lib/postgresql/data(persistent storage)
Network:
postgres-{projectName}-network(bridge network for isolation)
Health Check:
- Test:
pg_isready -U postgres -d postgres-{projectName} - Interval: 10s, Timeout: 5s, Retries: 5
- Start period: 30s for initialization
Connection String:
postgresql://postgres:password@localhost:5432/postgres-{projectName}
