Created
November 25, 2020 21:12
-
-
Save alexesca/832255e179a0266ecd25b68655d9364b to your computer and use it in GitHub Desktop.
How to add mongo
This file contains hidden or 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
mongo: | |
image: mongo:latest | |
container_name: mongoAWS | |
hostname: mongodbAWS | |
volumes: | |
- ./.docker/mongodb/mongod.conf:/etc/mongod.conf | |
- ./.docker/mongodb/initdb.d/:/docker-entrypoint-initdb.d/ | |
- ./.docker/mongodb/data/db/:/data/db/ | |
- ./.docker/mongodb/data/log/:/var/log/mongodb/ | |
env_file: | |
- .env | |
environment: | |
MONGO_INITDB_ROOT_USERNAME: user | |
MONGO_INITDB_ROOT_PASSWORD: 123pass | |
MONGO_INITDB_DATABASE: mongoAWS | |
ports: | |
- "27017:27017" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment