Skip to content

Commit

Permalink
add mongo-express
Browse files Browse the repository at this point in the history
  • Loading branch information
khaled196 committed Nov 30, 2023
1 parent f0e450c commit e09ae9f
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions docs/mongodb-pymongo.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,24 @@ Create a YAML file named *docker-compose.yaml* and copy this script to it.
version: '3.6'
services:
mongodb:
mongo-client:
image: mongo:3.6
restart: unless-stopped
volumes:
- ./<Directory/db>:/data/db
- ./beacon/db:/data/db
ports:
- "27027:27017"
- "27017:27017"
mongo-express:
image: mongo-express
restart: unless-stopped
environment:
- ME_CONFIG_MONGODB_SERVER=mongo-client
- ME_CONFIG_MONGODB_PORT=27017
- ME_CONFIG_BASICAUTH_USERNAME=admin
- ME_CONFIG_BASICAUTH_PASSWORD=adminpass
ports:
- "8081:8081"
```


Expand All @@ -28,7 +39,6 @@ Run the commands below to create a docker container.

```
docker-compose up -d
docker run -d -p 27016:27017 --name mongo-client mongo:3.6
docker exec -it mongo-client bash
```

Expand Down

0 comments on commit e09ae9f

Please sign in to comment.