Created
July 23, 2021 10:13
-
-
Save Raks-coder/d5125971830b2d23c364253c7554569c to your computer and use it in GitHub Desktop.
A sample yaml file to show use of docker-compose
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
# my-app: | |
# image: ${docker-registry}/my-app:1.0 | |
# ports: | |
# - 3000:3000 | |
mongodb: | |
image: mongo | |
ports: | |
- 27017:27017 | |
environment: | |
- MONGO_INITDB_ROOT_USERNAME=admin | |
- MONGO_INITDB_ROOT_PASSWORD=password | |
volumes: | |
- mongo-data:/data/db | |
mongo-express: | |
image: mongo-express | |
ports: | |
- 8080:8081 | |
environment: | |
- ME_CONFIG_MONGODB_ADMINUSERNAME=admin | |
- ME_CONFIG_MONGODB_ADMINPASSWORD=password | |
- ME_CONFIG_MONGODB_SERVER=mongodb | |
volumes: | |
mongo-data: | |
driver: local |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment