Overview
This project provides a convenient way to start various database containers (PostgreSQL, MongoDB, SQL Server, Redis, Memcached, and etcd) using a simple .env
file for configuration. It also includes a Makefile for easy execution.
Features:
- Multiple databases: Supports PostgreSQL, MongoDB, SQL Server, Redis, Memcached, and etcd.
.env
configuration: Customizable settings through an.env
file.- Makefile: Streamlined execution with a Makefile.
- Flexibility: Easily add or remove databases as needed.
Getting Started
Prerequisites: Docker and Make must be installed on your system.
Installation:
-
Clone the repository:
git clone https://github.com/4kpros/docker-database.git
-
Create a .env file: Copy the provided .env.example file and rename it to .env Customize the settings as required:
cp .env.example .env
-
Build and run: Use the provided Makefile to build and run the containers:
- To Start a specific service (replace with the service name:
postgres
mongodb
sqlserver
redis
memcached
etcd
)make <service>
- Example:
make postgres
- To Start all the services
make all
- To Start a specific service (replace with the service name:
-
To stop and remove the containers:
- To Stop a specific service (replace
<service>
with the service name:postgres
mongodb
sqlserver
redis
memcached
etcd
)make stop-<service>
- Example:
make stop-postgres
- To Stop all the services
make stop-all
- To Stop a specific service (replace
-
Generated data
Data for each service is generated into the folder
build/data/