Skip to content

Instantly share code, notes, and snippets.

@hoiheart
Created February 6, 2020 02:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hoiheart/cbb2c48d2cf8ce9872c9133e610a1196 to your computer and use it in GitHub Desktop.
Save hoiheart/cbb2c48d2cf8ce9872c9133e610a1196 to your computer and use it in GitHub Desktop.
docker-compose mongo init 설정 (yaml)
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