Skip to content

Instantly share code, notes, and snippets.

@kamiazya
Last active February 26, 2020 08:39
Show Gist options
  • Select an option

  • Save kamiazya/7e0b5cc1c066932803d51c04e620c99f to your computer and use it in GitHub Desktop.

Select an option

Save kamiazya/7e0b5cc1c066932803d51c04e620c99f to your computer and use it in GitHub Desktop.
Docker上でmongodbを動かす最小構成
version: '3.1'
services:
mongo:
image: mongo:4.0.8
restart: always
command: --smallfiles
ports:
- 27017:27017
# environment:
# MONGO_INITDB_ROOT_USERNAME: root
# MONGO_INITDB_ROOT_PASSWORD: example
volumes:
- storage-data::/data/db
mongo-express:
image: mongo-express
restart: always
ports:
- 8081:8081
# environment:
# ME_CONFIG_MONGODB_ADMINUSERNAME: root
# ME_CONFIG_MONGODB_ADMINPASSWORD: example
volumes:
storage-data:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment