← All components
MongoDB Database
MongoDB database integration via Docker and native driver. Includes Docker Compose configuration and connection utilities. No-ORM approach for maximum flexibility.
Copy the files below, or open this folder on GitHub. Each file is stamped with a limited-use licence, generator and date. SHA-256 is of the published catalog bytes, before the stamp.
- id
- mongodb
- stack
- Next.js
- version
- 1.0.0
- compatibility
- nextjs >=16 <17 · react >=19 <20
- requires
- nextjs-base
- env vars
- MONGODB_URI, MONGODB_DB
Verified passing · daily buildIntegrity sha256:463a89fc97473a1c…
Files (3)
docker-compose.yml · sha256:463a89fc97473a1c…
// Licensed by BotKelp — https://www.botkelp.com
/**
* MongoDB Docker Compose Configuration
*
* This configuration sets up a MongoDB 7.0 container for development.
*
* Source: https://hub.docker.com/_/mongo
* Verified: 2026-09-06
*/
version: '3.8'
services:
mongodb:
image: mongo:7.0
container_name: mongodb
restart: unless-stopped
environment:
MONGO_INITDB_ROOT_USERNAME: ${MONGODB_USER:-mongodb}
MONGO_INITDB_ROOT_PASSWORD: ${MONGODB_PASSWORD:-mongodb}
MONGO_INITDB_DATABASE: ${MONGODB_DB:-mydb}
ports:
- "27017:27017"
volumes:
- mongodb_data:/data/db
healthcheck:
test: ["CMD", "mongosh", "--eval", "db.adminCommand('ping')"]
interval: 10s
timeout: 5s
retries: 5
volumes:
mongodb_data:
driver: local