Ad

docker-postgresql-multiple-databases: Create multiple databases

This repository provides a script to initialize multiple PostgreSQL databases during container startup, leveraging the official PostgreSQL Docker image and the `/docker-entrypoint-initdb.d` directory.
Screenshot of mrts/docker-postgresql-multiple-databases homepage

This project facilitates the creation of multiple PostgreSQL databases when a container is started using the official PostgreSQL Docker image. It leverages the standard Docker entrypoint mechanism by utilizing the /docker-entrypoint-initdb.d directory to execute SQL scripts upon database initialization. This avoids manual database creation after container deployment.

The project simplifies the process of setting up multiple databases by providing a readily usable script. It's a straightforward solution for scenarios requiring multiple databases for development or testing. The approach adheres to the official Docker documentation regarding initialization scripts.

  • Database Initialization: Automatically creates multiple databases during container startup based on environment variables.
  • Docker Compose Support: Easily integrates with Docker Compose for managing multi-container applications.
  • Customizable Names: Supports non-standard database names, including those with hyphens and uppercase letters.
  • Simple Script: Provides a single, easy-to-understand script for database creation.
  • Official Image Compatibility: Works seamlessly with the official PostgreSQL Docker image.

The project offers a focused solution for its intended use case and relies on established Docker practices. It has been available for several years and shows consistent usage and minimal issues. The documentation is concise and relevant, covering the core functionality effectively. However, the project lacks extensive testing or formal release cycles.

Developers can use this project to streamline database setup in their Dockerized PostgreSQL environments. It's beneficial for development and testing workflows requiring multiple databases, providing a convenient alternative to manual database creation procedures. It offers a simple, integrated approach compared to managing database initialization externally.

Languages:
Summarize:
Share:
Stars
742
Forks
264
Issues
11
Created
8 years ago
Commit
2 years ago
License
MIT
Archived
No
Updated 16 days ago

Similar Repositories