Docker Compose1 docker-compose.yml 만들기 version: '3.1' services: database: image: mongo:4.2.6 container_name: smartordb restart: always environment: MONGO_INITDB_DATABASE: admin MONGO_INITDB_ROOT_DATABASE: admin MONGO_INITDB_ROOT_USERNAME: root MONGO_INITDB_ROOT_PASSWORD: 1234 volumes: - ./init-mongo.js:/docker-entrypoint-initdb.d/init-mongo.js:ro - ./mongod.conf:/etc/mongod.conf - ../data:/data/db ports: - '27017:27017.. 2020. 6. 3. 이전 1 다음