Skip to content

Commit

Permalink
Install and config mongo
Browse files Browse the repository at this point in the history
  • Loading branch information
mascam97 committed Jun 7, 2022
1 parent 1927313 commit 054b89f
Show file tree
Hide file tree
Showing 8 changed files with 362 additions and 16 deletions.
7 changes: 7 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
DATABASE_NAME=
API_KEY=
DATABASE_PORT=

MONGO_INITDB_ROOT_USERNAME=root
MONGO_INITDB_ROOT_PASSWORD=root
MONGO_DB=nestjs-store
MONGO_PORT=27017
MONGO_HOST=localhost
MONGO_CONNECTION=mongodb
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,6 @@ lerna-debug.log*

# Project
*.env

# Docker data
/mongo_data
21 changes: 21 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
version: '3.3'

services:
mongo:
image: mongo:4.4
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: root
ports:
- 27017:27017
volumes:
- ./mongo_data:/data/db
express:
image: mongo-express
restart: always
ports:
- 8081:8081
environment:
ME_CONFIG_MONGODB_ADMINUSERNAME: root
ME_CONFIG_MONGODB_ADMINPASSWORD: root
ME_CONFIG_MONGODB_URL: mongodb://root:root@mongo:27017/
Loading

0 comments on commit 054b89f

Please sign in to comment.