docker-compose.yml 515 B

123456789101112131415161718192021222324
  1. version: "3.1"
  2. services:
  3. mongo:
  4. image: mongo
  5. restart: always
  6. ports:
  7. - 27017:27017
  8. volumes:
  9. - ./mongoData:/data/db
  10. environment:
  11. MONGO_INITDB_ROOT_USERNAME: root
  12. MONGO_INITDB_ROOT_PASSWORD: example
  13. mongo-express:
  14. image: mongo-express:0.54.0
  15. restart: always
  16. ports:
  17. - 8081:8081
  18. environment:
  19. ME_CONFIG_MONGODB_ADMINUSERNAME: root
  20. ME_CONFIG_MONGODB_ADMINPASSWORD: example
  21. ME_CONFIG_MONGODB_URL: mongodb://root:example@mongo:27017/