Last active
July 7, 2019 19:04
-
-
Save heffo42/5a202788215888502fcc174a5cfbbe9b to your computer and use it in GitHub Desktop.
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.1' | |
services: | |
mongodb: | |
image: mongo:4.0.0-xenial | |
volumes: | |
- './mongodb:/data/db' | |
networks: | |
- backend | |
deploy: | |
placement: | |
constraints: [node.role == manager] | |
environment: | |
MONGO_INITDB_ROOT_USERNAME: <username> | |
MONGO_INITDB_ROOT_PASSWORD: <password> | |
ports: | |
- "27017:27017" | |
networks: | |
backend: | |
external: true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment