Created
February 6, 2020 02:10
-
-
Save hoiheart/cbb2c48d2cf8ce9872c9133e610a1196 to your computer and use it in GitHub Desktop.
docker-compose mongo init 설정 (yaml)
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: | |
mongo: | |
container_name: mongo | |
image: mongo | |
restart: always | |
environment: | |
MONGO_INITDB_ROOT_USERNAME: "${MONGODB_USER}" | |
MONGO_INITDB_ROOT_PASSWORD: "${MONGODB_PASS}" | |
MONGO_INITDB_DATABASE: "${MONGODB_DATABASE}" | |
volumes: | |
- ./docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d:ro | |
ports: | |
- "27017:27017" | |
networks: | |
- server | |
networks: | |
server: | |
driver: bridge |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment