Templates for developers to easily create and remove various services within their local development environment, such as postgres and mongodb.
- Install Docker via https://docs.docker.com/desktop/install/
- Navigate to the sub-folder of the service you wish to create:
cd mongo
- Copy
.env.example
to.env
and change values if needed:
cp .env.example .env
- Run docker compose. The
-d
flag runs is a detached-state so that the command-line window can be closed without impacting the service.
docker compose up -d
- To stop the container and destroy the data within, run from the same folder:
docker compose down
Mac users may need to install the following tools to interact with the various services:
To gain access to the Redis CLI:
brew tap ringohub/redis-cli
brew update && brew doctor
brew install redis-cli
To gain access to the MongoDB CLI:
brew install mongodb/brew/mongodb-database-tools
The following might be needed for Postgres' psql
to work on some systems:
brew install libpq