Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/satishdash/alpine-mongodb
Creates an alpine mongodb4.0 docker image
https://github.com/satishdash/alpine-mongodb
alpine dockerfile mongo mongodb
Last synced: 1 day ago
JSON representation
Creates an alpine mongodb4.0 docker image
- Host: GitHub
- URL: https://github.com/satishdash/alpine-mongodb
- Owner: satishdash
- License: gpl-3.0
- Created: 2020-09-01T11:47:42.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-09-02T18:54:36.000Z (over 4 years ago)
- Last Synced: 2024-11-06T21:11:59.407Z (about 2 months ago)
- Topics: alpine, dockerfile, mongo, mongodb
- Language: Dockerfile
- Homepage:
- Size: 28.3 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# alpine-mongo
Creates an alpine based mongodb4.0 docker image##### *Simple yet an elegant way to set up your test environment in just a couple of steps!!!*
:bulb: **Credentials**
*[NOT FOR PRODUCTION USE]*
Admin User
```
Admin username: admin
Admin user password: admin
```Database User
```
DB username: mongo
DB user password: mongo
```:bulb: **Way to setup for integration test**
Setup:
```
make teardown && make setup```
Login to the mongodb container:
```
$ docker exec -ti mongodb sh -l
```
```
mongodb:/# mongo --authenticationDatabase admin -u mongo -p mongo testMongoDB shell version v4.0.5
connecting to: mongodb://127.0.0.1:27017/test?authSource=admin&gssapiServiceName=mongodb
Implicit session: session { "id" : UUID("b77c96cd-ce56-475b-8b8d-ab23b65fa712") }
MongoDB server version: 4.0.5
Welcome to the MongoDB shell.
For interactive help, type "help".
For more comprehensive documentation, see
http://docs.mongodb.org/
Questions? Try the support group
http://groups.google.com/group/mongodb-user
```Test:
```
> use test
switched to db test> db.foo.insert({"a":1})
WriteResult({ "nInserted" : 1 })> db.foo.find()
{ "_id" : ObjectId("5f4e3da2b4bba22a8b4bf92a"), "a" : 1 }
```:bulb: **Teardown resources after you're done**
Teardown:
```
make teardown
```