From 8cbc1868cd392e4ecf6408aa37fca88658600432 Mon Sep 17 00:00:00 2001 From: Twilight Date: Wed, 13 Dec 2023 19:20:53 +0800 Subject: [PATCH] Initial commit --- .gitignore | 1 + docker-compose.yml | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 .gitignore create mode 100644 docker-compose.yml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..adbb97d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +data/ \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..fa23e35 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,25 @@ +# Use root/example as user/password credentials +version: '3.1' + +services: + + mongo: + image: mongo + restart: always + ports: + - 27017:27017 + volumes: + - ./data:/data/db + environment: + MONGO_INITDB_ROOT_USERNAME: root + MONGO_INITDB_ROOT_PASSWORD: "123456" + + # mongo-express: + # image: mongo-express + # restart: always + # ports: + # - 8081:8081 + # environment: + # ME_CONFIG_MONGODB_ADMINUSERNAME: root + # ME_CONFIG_MONGODB_ADMINPASSWORD: "123456" + # ME_CONFIG_MONGODB_URL: mongodb://root:123456@mongo:27017/