From b28ef82e8045326bca0e30e54f479edcd26cf6fd Mon Sep 17 00:00:00 2001 From: jiooum Date: Sat, 5 Oct 2024 00:19:59 +0700 Subject: [PATCH] [#6] Feat: MongoDB --- services/minio/docker-compose.yml | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/services/minio/docker-compose.yml b/services/minio/docker-compose.yml index 8bdd7d8..c3ef523 100644 --- a/services/minio/docker-compose.yml +++ b/services/minio/docker-compose.yml @@ -1,5 +1,5 @@ version: '3.8' - +name: base_services networks: services-network: driver: bridge @@ -20,3 +20,29 @@ services: volumes: - /mnt/storage/minio:/data command: server /data --console-address ":9001" + + mongo: + image: mongo:latest + container_name: pz_mongo + ports: + - "27017:27017" + restart: always + environment: + MONGO_INITDB_ROOT_USERNAME: admin + MONGO_INITDB_ROOT_PASSWORD: mongodb123 + MONGO_INITDB_DATABASE: default + MONGODB_DATA_DIR: /data/db + MONDODB_LOG_DIR: /dev/null + networks: + - services-network + healthcheck: + test: ["CMD", "mongosh", "--eval", "db.adminCommand"] + interval: 10s + timeout: 10s + retries: 5 + start_period: 20s + + volumes: + - type: bind + source: /mnt/data/100.DockerVolumes/0.MongoData + target: /data/db