Skip to content

k1de/mongodb-minimal-kit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mongodb-minimal-kit

Minimal MongoDB kit: isolated projects, dedicated users, secure setup.

Quick Start (local, no TLS)

cp .env.template .env
# Edit .env - change ROOT_PASSWORD

docker-compose up -d
./create-project.sh myapp

Creates myapp_db with users myapp_reader / myapp_writer and saves credentials to myapp.env, myapp.json.

TLS (for production)

# Edit .env:
# TLS_ENABLED=true
# CERT_HOSTNAME=your-server.com
# CERT_IP=203.0.113.50

./generate-certs.sh
docker-compose up -d

Credentials include caBase64 for client TLS configuration.

Commands

Action Command
Start docker-compose up -d
Stop docker-compose down
Logs docker-compose logs -f
Create project ./create-project.sh NAME
Recreate project ./create-project.sh NAME --force
Reset all docker-compose down -v && rm -rf data/

License

ISC © tish

About

Lightweight scripts for managing isolated MongoDB projects with dedicated user permissions.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages