Skip to content

Instantly share code, notes, and snippets.

@tiagoandrepro
Created April 26, 2023 12:28
Show Gist options
  • Save tiagoandrepro/e303ef7d36bb00c7c2b81439350ba511 to your computer and use it in GitHub Desktop.
Save tiagoandrepro/e303ef7d36bb00c7c2b81439350ba511 to your computer and use it in GitHub Desktop.
# Use root/example as user/password credentials
version: '3.1'
services:
mongo:
image: mongo
restart: always
ports:
- 27017:27017
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: secret
mongo-express:
image: mongo-express
restart: always
ports:
- 8081:8081
environment:
ME_CONFIG_MONGODB_ADMINUSERNAME: root
ME_CONFIG_MONGODB_ADMINPASSWORD: secret
ME_CONFIG_MONGODB_URL: mongodb://root:secret@mongo:27017/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment