Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yuanyu90221/mongo_docker_latest
https://github.com/yuanyu90221/mongo_docker_latest
Last synced: 1 day ago
JSON representation
- Host: GitHub
- URL: https://github.com/yuanyu90221/mongo_docker_latest
- Owner: yuanyu90221
- Created: 2020-06-04T20:17:36.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-02-22T15:47:26.000Z (almost 2 years ago)
- Last Synced: 2024-04-21T14:00:43.943Z (9 months ago)
- Language: JavaScript
- Size: 15.6 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# mongo_docker_latest
## introduction
This is docker-compose.yml for latest mongo version
## verify
login into container
```script==
docker exec -it mongo ${MONGO_INITDB_ROOT_USERNAME} -p
```
## createUser for InitDB```script===
db.createUser({"user":"username", "pwd":"pwd", "roles":[{"role":"readWrite", "db":"dbname"}]})
```
## run with demo
```script==
npm i
```
```script==
npm run demo
```
## setup config with .env
```script==
MONGO_INITDB_ROOT_USERNAME=
MONGO_INITDB_ROOT_PASSWORD=
PORT=
MONGO_HOST=
DB_NAME=
```